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

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

Issue 11098030: Revert 160959 - [android_webview] Use AwContents loadUrl method instead of ContentViewCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java (revision 160963)
+++ android_webview/javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java (working copy)
@@ -7,7 +7,6 @@
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;
@@ -21,15 +20,14 @@
public class ClientOnReceivedErrorTest extends AndroidWebViewTestBase {
private TestAwContentsClient mContentsClient;
- private AwContents mAwContents;
+ private ContentViewCore mContentViewCore;
@Override
public void setUp() throws Exception {
super.setUp();
mContentsClient = new TestAwContentsClient();
- final AwTestContainerView testContainerView =
- createAwTestContainerViewOnMainSync(mContentsClient);
- mAwContents = testContainerView.getAwContents();
+ mContentViewCore =
+ createAwTestContainerViewOnMainSync(mContentsClient).getContentViewCore();
}
/*@MediumTest
@@ -43,7 +41,7 @@
String url = "http://man.id.be.really.surprised.if.this.address.existed.blah/";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
- loadUrlAsync(mAwContents, url);
+ loadUrlAsync(mContentViewCore, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_HOST_LOOKUP,
@@ -64,7 +62,7 @@
String url = "foo://some/resource";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
- loadUrlAsync(mAwContents, url);
+ loadUrlAsync(mContentViewCore, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNSUPPORTED_SCHEME,
@@ -82,7 +80,7 @@
mContentsClient.getOnPageFinishedHelper();
int currentCallCount = onPageFinishedHelper.getCallCount();
- loadDataAsync(mAwContents,
+ loadDataAsync(mContentViewCore,
"<html><iframe src=\"http//invalid.url.co/\" /></html>",
"text/html",
false);
@@ -100,7 +98,7 @@
final String url = "file:///android_asset/does_not_exist.html";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
useTestResourceContext();
- loadUrlAsync(mAwContents, url);
+ loadUrlAsync(mContentViewCore, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNKNOWN,
@@ -121,7 +119,7 @@
final String url = "file:///android_res/raw/does_not_exist.html";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
useTestResourceContext();
- loadUrlAsync(mAwContents, url);
+ loadUrlAsync(mContentViewCore, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNKNOWN,

Powered by Google App Engine
This is Rietveld 408576698