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

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

Issue 481803004: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments and rebased the patch. Created 6 years, 3 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/AwSettingsTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
index 9156196ae45e5aeccf1f3b03063ad7b0ca7af3fb..9ecf9717e0223e4a12621bbbb5520e130c07ed53 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
@@ -33,9 +33,9 @@ import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.TestFileUtil;
import org.chromium.base.test.util.UrlUtils;
-import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.content.browser.test.util.HistoryUtils;
+import org.chromium.content_public.browser.WebContents;
import org.chromium.net.test.util.TestWebServer;
import org.chromium.ui.gfx.DeviceDisplayInfo;
@@ -1675,7 +1675,7 @@ public class AwSettingsTest extends AwTestBase {
final AwTestContainerView testContainerView =
createAwTestContainerViewOnMainSync(contentClient);
final AwContents awContents = testContainerView.getAwContents();
- final ContentViewCore contentView = testContainerView.getContentViewCore();
+ final WebContents webContents = awContents.getWebContents();
CallbackHelper onPageFinishedHelper = contentClient.getOnPageFinishedHelper();
AwSettings settings = getAwSettingsOnUiThread(awContents);
settings.setJavaScriptEnabled(true);
@@ -1701,9 +1701,9 @@ public class AwSettingsTest extends AwTestBase {
settings.setUserAgentString(null);
// Must not cause any changes until the next page loading.
assertEquals(page2Title + customUserAgentString, getTitleOnUiThread(awContents));
- HistoryUtils.goBackSync(getInstrumentation(), contentView, onPageFinishedHelper);
+ HistoryUtils.goBackSync(getInstrumentation(), webContents, onPageFinishedHelper);
assertEquals(page1Title + defaultUserAgentString, getTitleOnUiThread(awContents));
- HistoryUtils.goForwardSync(getInstrumentation(), contentView,
+ HistoryUtils.goForwardSync(getInstrumentation(), webContents,
onPageFinishedHelper);
assertEquals(page2Title + defaultUserAgentString, getTitleOnUiThread(awContents));
}

Powered by Google App Engine
This is Rietveld 408576698