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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/GetTitleTest.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/GetTitleTest.java
===================================================================
--- android_webview/javatests/src/org/chromium/android_webview/test/GetTitleTest.java (revision 160963)
+++ android_webview/javatests/src/org/chromium/android_webview/test/GetTitleTest.java (working copy)
@@ -7,10 +7,10 @@
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.Smoke;
-import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.test.util.TestWebServer;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.DisabledTest;
+import org.chromium.content.browser.ContentViewCore;
/**
* A test suite for ContentView.getTitle().
@@ -23,7 +23,7 @@
private static final String GET_TITLE_TEST_NO_TITLE_PATH = "/get_title_test_no_title.html";
private TestAwContentsClient mContentsClient;
- private AwContents mAwContents;
+ private ContentViewCore mContentViewCore;
private static class PageInfo {
public final String mTitle;
@@ -39,9 +39,8 @@
public void setUp() throws Exception {
super.setUp();
mContentsClient = new TestAwContentsClient();
- final AwTestContainerView testContainerView =
- createAwTestContainerViewOnMainSync(mContentsClient);
- mAwContents = testContainerView.getAwContents();
+ mContentViewCore =
+ createAwTestContainerViewOnMainSync(mContentsClient).getContentViewCore();
}
private static final String getHtml(String title) {
@@ -55,9 +54,9 @@
}
private String loadFromDataAndGetTitle(String html) throws Throwable {
- loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
+ loadDataSync(mContentViewCore, mContentsClient.getOnPageFinishedHelper(),
html, "text/html", false);
- return getTitleOnUiThread(mAwContents);
+ return getTitleOnUiThread(mContentViewCore);
}
private PageInfo loadFromUrlAndGetTitle(String html, String filename) throws Throwable {
@@ -66,8 +65,8 @@
webServer = new TestWebServer(false);
final String url = webServer.setResponse(filename, html, null);
- loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), url);
- return new PageInfo(getTitleOnUiThread(mAwContents),
+ loadUrlSync(mContentViewCore, mContentsClient.getOnPageFinishedHelper(), url);
+ return new PageInfo(getTitleOnUiThread(mContentViewCore),
url.replaceAll("http:\\/\\/", ""));
} finally {

Powered by Google App Engine
This is Rietveld 408576698