Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java

Issue 12609013: [android_webview] Build test code against the shell APK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix up minsdkversoin Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
index 4252adfd8b57e4908eb0c488650349ca080b9e46..0c3990afc1e2f2c78c9d5fba0fd355f6860e71ca 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
@@ -417,63 +417,28 @@ public class AwContentsClientShouldInterceptRequestTest extends AndroidWebViewTe
mContentsClient.getOnPageFinishedHelper().getCallCount());
}
- /**
- * Configure the browser to load resources from the test harness instead of the browser
- * application.
- */
- private void useTestResourceContext() {
- AndroidProtocolHandler.setResourceContextForTesting(getInstrumentation().getContext());
- }
-
- /**
- * Configure the browser to load resources from the browser application.
- */
- private void resetResourceContext() {
- AndroidProtocolHandler.setResourceContextForTesting(null);
- }
-
@SmallTest
@Feature({"AndroidWebView"})
public void testNotCalledForExistingResource() throws Throwable {
- try {
- useTestResourceContext();
- notCalledForUrlTemplate("file:///android_res/raw/resource_file.html");
- } finally {
- resetResourceContext();
- }
+ notCalledForUrlTemplate("file:///android_res/raw/resource_file.html");
}
@SmallTest
@Feature({"AndroidWebView"})
public void testCalledForNonexistentResource() throws Throwable {
- try {
- useTestResourceContext();
- calledForUrlTemplate("file:///android_res/raw/no_file.html");
- } finally {
- resetResourceContext();
- }
+ calledForUrlTemplate("file:///android_res/raw/no_file.html");
}
@SmallTest
@Feature({"AndroidWebView"})
public void testNotCalledForExistingAsset() throws Throwable {
- try {
- useTestResourceContext();
- notCalledForUrlTemplate("file:///android_asset/asset_file.html");
- } finally {
- resetResourceContext();
- }
+ notCalledForUrlTemplate("file:///android_asset/asset_file.html");
}
@SmallTest
@Feature({"AndroidWebView"})
public void testCalledForNonexistentAsset() throws Throwable {
- try {
- useTestResourceContext();
- calledForUrlTemplate("file:///android_res/raw/no_file.html");
- } finally {
- resetResourceContext();
- }
+ calledForUrlTemplate("file:///android_res/raw/no_file.html");
}
@SmallTest

Powered by Google App Engine
This is Rietveld 408576698