Add isWebViewAvailable check to shouldInterceptRequest tests
BUG: 17053911
Change-Id: I8391325cb8ba5996997fa7da3a00fd8e7f0fa830
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
index fbffbd3..a8044d2 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewClientTest.java
@@ -347,6 +347,10 @@
// Test that shouldInterceptRequest is called with the correct parameters
public void testShouldInterceptRequestParams() throws Throwable {
+ if (!NullWebViewUtils.isWebViewAvailable()) {
+ return;
+ }
+
final String mainPath = "/main";
final String mainPage = "<head></head><body>test page</body>";
final String headerName = "x-test-header-name";
@@ -409,6 +413,10 @@
// Test that the WebResourceResponse returned by shouldInterceptRequest is handled correctly
public void testShouldInterceptRequestResponse() throws Throwable {
+ if (!NullWebViewUtils.isWebViewAvailable()) {
+ return;
+ }
+
final String mainPath = "/main";
final String mainPage = "<head></head><body>test page</body>";
final String interceptPath = "/intercept_me";