Assert SslError code in AwContentsTest#testSslPreferences |
||||
Issue descriptionAwContentsTest#testSslPreferences currently tests that onReceivedSslError is called, but doesn't assert the error code with which it is called, or other argument information. We should consider exposing this to the test to have stronger assertions. Initially suggested by changwan@ at http://crrev/c/1383732.
,
Jan 15
,
Jan 16
(Bulk edit to add component)
,
Jan 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d85b995bdb5a2ac47e3136114939e863d0b0122 commit 5d85b995bdb5a2ac47e3136114939e863d0b0122 Author: Nate Fischer <ntfschr@chromium.org> Date: Wed Jan 16 02:18:18 2019 AW: expand SslError test coverage No change to production logic, only tests. This refactors AwContentsTest#testSslPreferences() into a separate test suite (resolving a long-standing TODO) and improves test coverage for the onReceivedSslError() callback: * Asserts error codes for a variety of circumstances * Explicitly checks onReceivedError() and onReceivedHttpError() are not called * Asserts that "allow" and "cancel" show and block the page, respectively * Splits testSslPreferences into separate test cases for "allow" and "cancel" This also removes an unused variable from AwNetworkConfigurationTest, since this was a mistake from a previous CL. R=changwan@chromium.org Bug: 919734 Test: run_webview_instrumentation_test_apk -f=SslPreferencesTest#* Change-Id: I0ff330cbd9ffc4066a22d6eb0a1bb0e96f6a8d94 Reviewed-on: https://chromium-review.googlesource.com/c/1410396 Commit-Queue: Nate Fischer <ntfschr@chromium.org> Reviewed-by: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#623044} [modify] https://crrev.com/5d85b995bdb5a2ac47e3136114939e863d0b0122/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java [modify] https://crrev.com/5d85b995bdb5a2ac47e3136114939e863d0b0122/android_webview/javatests/src/org/chromium/android_webview/test/AwNetworkConfigurationTest.java [add] https://crrev.com/5d85b995bdb5a2ac47e3136114939e863d0b0122/android_webview/javatests/src/org/chromium/android_webview/test/SslPreferencesTest.java [modify] https://crrev.com/5d85b995bdb5a2ac47e3136114939e863d0b0122/android_webview/javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java [modify] https://crrev.com/5d85b995bdb5a2ac47e3136114939e863d0b0122/android_webview/test/BUILD.gn
,
Jan 16
No manual verification necessary, only adds test coverage. |
||||
►
Sign in to add a comment |
||||
Comment 1 by ntfschr@chromium.org
, Jan 8