History log of /frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
610473e5bb1295c992f8be92311bbfad96f03311 11-Apr-2018 Gustav Sennton <gsennton@google.com> [WebView Support Lib] Tests: turn API level checks into feature checks.

Currently we guard feature tests with API level checks to avoid calling
features that are not supported under the current (device + WebView)
configuration.
These kinds of checks make it more cumbersome to do local testing since
you need to remove the checks to run the tests on older devices where
the support-library-glue path will be tested.

With this CL we turn the API level checks into feature-checks so that
whenever the tests are run on older devices with up-to-date WebView APKs
they will be testing the support-library-glue path.

Note that Presubmit won't exercise the support-library-glue path until
b/73454652 has been fixed (because we won't install
support-library-compatible WebView APKs on bots until that bug is
solved).

Bug: 38220211
Test: run androidx.webkit tests on an L device with an up-to-date
WebView APK.
Change-Id: I80ce18c55a8abd6565a8d0ff5297ef9c7b9f30be
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
eab2c96c81d8081fa56f8ca44a271633a0836ea3 14-Apr-2018 Nate Fischer <ntfschr@google.com> [WebView Support Library] Use WebViewClientCompat in existing tests

No change in logic, this swaps WebViewClient with WebViewClientCompat in
existing support-lib-side tests to get slightly better coverage for
WebViewClientCompat.

This also declares that testSetSafeBrowsingWhitelistWithValidList
depends on the SAFE_BROWSING_HIT feature.

Bug: 77979250
Test: ./gradlew :webkit:connectedAndroidTest
Change-Id: I91a82982cc181c27f02c8cd28c62e87f631e6173
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
055157a7821fe8a24e14e619b1036bb2d6d4e2a8 23-Mar-2018 Gustav Sennton <gsennton@google.com> [WebView Support Library] Support incompatible WebView APKs.

Most functionality in the WebView Support Library requires an up-to-date
WebView APK.
We need a way of dealing with WebView APKs that are not up-to-date.
In this CL we ensure that if the current WebView APK is not up-to-date
(i.e. the support library cannot bypass the framework to call into the
WebView APK) the support library declares that the APK supports no
features at all.

Bug: 76202025
Test: run androidx.webkit
Change-Id: I30ecf2459fc793c10f1817a431b18804344e2b8e
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
258be17cae93056ed13f36a4d7ee7922308e604a 23-Mar-2018 Gustav Sennton <gsennton@google.com> [WebView Support Library] Suppress flaky WebViewCompat.testCheckThread

testCheckThread calls an API on the wrong thread and ensures it throws a
certain exception. But currently, when running on devices with WebView
APKs that are incompatible with the webview support library, we throw a
different exception related to the WebView APK code reflection failing.
Disable this test temporarily until we can fix this properly in
b/76202025.

Bug: 76172292
Test: run androidx.webkit tests.
Change-Id: If1ef44e438dd9873d1083dfe1275469f239f7dea
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
acd3a72acf01763e6b7eaedae975724f0bcbc03b 02-Mar-2018 Gustav Sennton <gsennton@google.com> [WebView Support Library] Create WebViewCompat.getCurrentWebViewPackage

WebViewCompat.getCurrentWebViewPackage is implemented differently for
different versions of Android - on Oreo and up we can use the existing
WebView.getCurrentWebViewPackage API, but for earlier Android versions
we need to use reflection to either fetch the currently loaded WebView
package, or the to-be-loaded WebView package.

Bug: 74100420
Test: run androidx.webkit tests.
Change-Id: Ia57221a792da3f468991d08d50426fc482cb0794
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
29e1a6266915840c5a5f2a4c17df58ef66cb4221 13-Mar-2018 Aurimas Liutikas <aurimas@google.com> Fix imports for webkit code.

A follow up after factor to make it so androidx imports go in the
correct order.

Test: ./gradlew buildOnServer
Change-Id: If022a8f1fabe2fc62efeb14d6008232e14a2af77
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
ac5fe7c617c66850fff75a9fce9979c6e5674b0f 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library

Test: None
Change-Id: I92e450c739fc9d77e8f8840bed4165ab88247fd6
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
f27b1ffc67228d73326ec3426fef4c9db75cd6fd 06-Mar-2018 Aurimas Liutikas <aurimas@google.com> Revert "Refactor support library."

This reverts commit b31c3281d870e9abb673db239234d580dcc4feff.

Change-Id: Icfa5b9af633739ad2c857dff22a2181bac6661ef
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
b31c3281d870e9abb673db239234d580dcc4feff 20-Feb-2018 Aurimas Liutikas <aurimas@google.com> Refactor support library.

Test: None
Change-Id: I11a047324832801555673dac45ec1d6590a6338b
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
fb962116b3e0eb4e95f7dac81e7ede0f993a6ee9 26-Feb-2018 Gustav Sennton <gsennton@google.com> [WebView Support Library] Add support for static WebView methods.

Add support for the support-library version of
WebViewFactoryProvider.Statics, used for implementing static WebView
methods.

Bug: 73151403
Test: run androidx.webkit tests (existing + newly added ones) on an L
device and a P device.
Change-Id: I8d161a67fba78b3793a5d7091358ed429da28487
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java
f9916c36b6536b496976413527bb71f3554282ab 14-Feb-2018 Gustav Sennton <gsennton@google.com> Add an initial version of the WebView Support Lib with a single API

Add the first WebView Support Library API:
WebView.insertVisualStateCallback().
Also add a test corresponding to the WebView CTS test for
WebView.insertVisualStateCallback().

This CL does NOT include feature detection - so trying use the WebView
Support Library on a device without a compatible WebView will cause a
crash for now.
When we add feature detection support apps will be able to check which
features are supported at run-time.

Bug: 68840936
Test: Run added tests with the necessary WebView APK installed (without
the correct APK the tests will fail).

Change-Id: Ia48e7662c82ba03d5b5edfce534733e0dc4569e6
/frameworks/support/webkit/src/androidTest/java/androidx/webkit/WebViewCompatTest.java