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

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

Issue 11028094: [android_webview] Use AwContents loadUrl method instead of ContentViewCore. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase yet again Created 8 years, 2 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/ClientOnReceivedErrorTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java
index a4a2be283028d3fb67a6570fc8e5674ec84000a3..4a99f6a17c907a0caa860617375b4fbde758e84d 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java
@@ -7,6 +7,7 @@ package org.chromium.android_webview.test;
import android.test.FlakyTest;
import android.test.suitebuilder.annotation.MediumTest;
+import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.AndroidProtocolHandler;
import org.chromium.android_webview.ErrorCodeConversionHelper;
import org.chromium.base.test.util.DisabledTest;
@@ -20,14 +21,15 @@ import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
private TestAwContentsClient mContentsClient;
- private ContentViewCore mContentViewCore;
+ private AwContents mAwContents;
@Override
public void setUp() throws Exception {
super.setUp();
mContentsClient = new TestAwContentsClient();
- mContentViewCore =
- createAwTestContainerViewOnMainSync(mContentsClient).getContentViewCore();
+ final AwTestContainerView testContainerView =
+ createAwTestContainerViewOnMainSync(mContentsClient);
+ mAwContents = testContainerView.getAwContents();
}
/*@MediumTest
@@ -41,7 +43,7 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
String url = "http://man.id.be.really.surprised.if.this.address.existed.blah/";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
- loadUrlAsync(mContentViewCore, url);
+ loadUrlAsync(mAwContents, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_HOST_LOOKUP,
@@ -62,7 +64,7 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
String url = "foo://some/resource";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
- loadUrlAsync(mContentViewCore, url);
+ loadUrlAsync(mAwContents, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNSUPPORTED_SCHEME,
@@ -80,7 +82,7 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
mContentsClient.getOnPageFinishedHelper();
int currentCallCount = onPageFinishedHelper.getCallCount();
- loadDataAsync(mContentViewCore,
+ loadDataAsync(mAwContents,
"<html><iframe src=\"http//invalid.url.co/\" /></html>",
"text/html",
false);
@@ -98,7 +100,7 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
final String url = "file:///android_asset/does_not_exist.html";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
useTestResourceContext();
- loadUrlAsync(mContentViewCore, url);
+ loadUrlAsync(mAwContents, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNKNOWN,
@@ -119,7 +121,7 @@ public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
final String url = "file:///android_res/raw/does_not_exist.html";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
useTestResourceContext();
- loadUrlAsync(mContentViewCore, url);
+ loadUrlAsync(mAwContents, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNKNOWN,

Powered by Google App Engine
This is Rietveld 408576698