New issue
Advanced search Search tips

Issue 919734 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jan 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task

Blocking:
issue 841556



Sign in to add a comment

Assert SslError code in AwContentsTest#testSslPreferences

Project Member Reported by ntfschr@chromium.org, Jan 8

Issue description

AwContentsTest#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.
 
Owner: ntfschr@chromium.org
Status: Started (was: Untriaged)
Labels: Proj-Servicification
(Bulk edit to add component)
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Verified (was: Started)
No manual verification necessary, only adds test coverage.

Sign in to add a comment