History log of /frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewClientCompatTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
08844ee84892d32475717f7905be72d7ebff6d61 30-Apr-2018 Nate Fischer <ntfschr@google.com> Merge "[WebView Support Library] split testOnSafeBrowsingHit into two tests" into pi-androidx-dev
d2cb2ed027d1e90e87f7bd9413f73bafef6ef7c8 30-Apr-2018 Nate Fischer <ntfschr@google.com> [WebView Support Library] split testOnSafeBrowsingHit into two tests

This splits testOnSafeBrowsingHit into testOnSafeBrowsingHitBackToSafety
and testOnSafeBrowsingHitProceed in WebViewClientCompatTest in the
support library. This is intended to be the support lib analog to
http://ag/3933408.

This also changes SafeBrowsingProceedClient and
SafeBrowsingBackToSafetyClient to inherit from a common
SafeBrowsingClient class.

Also, because not all devices support Safe Browsing, this changes an
'if' check into an assumeTrue statement, to make the meaning clear.

Bug: 77979250
Test: ./gradlew :webkit:connectedAndroidTest
Change-Id: I5e2fe877f41e71eb5dcf29d0cb6f03b6dc6ca804
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewClientCompatTest.java
302ebcc433c33d90c81a2c4db3993233b348808f 30-Apr-2018 Nate Fischer <ntfschr@google.com> [WebView Support Library] fix race condition in test

This fixes a race condition in testShouldOverrideUrlLoading(), where we
could call getLastShouldOverrideResourceRequest before WebView invokes
the shouldOverrideUrlLoading callback by using a CountDownLatch to wait
for the click to fully navigate.

Bug: 77979250
Test: ./gradlew :webkit:connectedAndroidTest
Change-Id: Ia2ae59bfb8c3bd6396f1189a4ff36e1d9be93da7
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewClientCompatTest.java
e7734de3cf9236fbba6af94873d9ada4a4a89af1 20-Apr-2018 Nate Fischer <ntfschr@google.com> [WebView Support Lib] Add basic tests for callbacks

This adds initial tests for WebViewClientCompat callbacks. The APIs
tested are:

* onReceivedError
* onPageCommitVisible
* shouldOverrideUrlLoading
* onSafeBrowsingHit

These tests are each based off CTS tests.

This CL omits tests for:

* onReceivedHttpError: that API requires an HTTP server. A later CL
will test that API.
* shouldOverrideUrlLoading:
- One test also depends on the HTTP server, as well as the test
Activity.

This also re-sorts the methods in WebViewOnUiThread to match the method
order in the CTS version of the class.

Bug: 77979250
Test: ./gradlew :webkit:connectedAndroidTest
Change-Id: If66c45ff23b3d2b4de70f76d4eb8821c5e9b79ea
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewClientCompatTest.java