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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.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/ClientOnPageFinishedTest.java
===================================================================
--- android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java (revision 160963)
+++ android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java (working copy)
@@ -7,9 +7,9 @@
import android.test.FlakyTest;
import android.test.suitebuilder.annotation.MediumTest;
-import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.test.util.TestWebServer;
import org.chromium.base.test.util.Feature;
+import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
/**
@@ -18,15 +18,14 @@
public class ClientOnPageFinishedTest 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
@@ -37,7 +36,7 @@
String html = "<html><body>Simple page.</body></html>";
int currentCallCount = onPageFinishedHelper.getCallCount();
- loadDataAsync(mAwContents, html, "text/html", false);
+ loadDataAsync(mContentViewCore, html, "text/html", false);
onPageFinishedHelper.waitForCallback(currentCallCount);
assertEquals("data:text/html," + html, onPageFinishedHelper.getUrl());
@@ -58,7 +57,7 @@
String url = "http://man.id.be.really.surprised.if.this.address.existed.blah/";
int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount();
int onPageFinishedCallCount = onPageFinishedHelper.getCallCount();
- loadUrlAsync(mAwContents, url);
+ loadUrlAsync(mContentViewCore, url);
onReceivedErrorHelper.waitForCallback(onReceivedErrorCallCount);
onPageFinishedHelper.waitForCallback(onPageFinishedCallCount);
@@ -84,7 +83,7 @@
assertEquals(0, onPageFinishedHelper.getCallCount());
final int pageWithSubresourcesCallCount = onPageFinishedHelper.getCallCount();
- loadDataAsync(mAwContents,
+ loadDataAsync(mContentViewCore,
"<html><iframe src=\"" + testPath + "\" /></html>",
"text/html",
false);
@@ -96,7 +95,7 @@
// we get is for the synchronizationUrl we know that the previous load did not schedule
// a callback for the iframe.
final int synchronizationPageCallCount = onPageFinishedHelper.getCallCount();
- loadUrlAsync(mAwContents, syncUrl);
+ loadUrlAsync(mContentViewCore, syncUrl);
onPageFinishedHelper.waitForCallback(synchronizationPageCallCount);
assertEquals(syncUrl, onPageFinishedHelper.getUrl());

Powered by Google App Engine
This is Rietveld 408576698