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

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

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch and addressed review comments. Created 6 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
index 32bea17f85cd84c392ed93e85e82c97e8f7efaf0..48c3a381c28b484437055c4efb67c641eec028b3 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java
@@ -14,6 +14,7 @@ import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.DOMUtils;
import org.chromium.content.browser.test.util.TouchCommon;
+import org.chromium.content_public.browser.WebContents;
/**
* Test WebChromeClient::onShow/HideCustomView.
@@ -21,6 +22,7 @@ import org.chromium.content.browser.test.util.TouchCommon;
public class AwContentsClientFullScreenVideoTest extends AwTestBase {
private FullScreenVideoTestAwContentsClient mContentsClient;
private ContentViewCore mContentViewCore;
+ private WebContents mWebContents;
private VideoTestWebServer mWebServer;
private AwTestContainerView mTestContainerView;
@@ -31,6 +33,7 @@ public class AwContentsClientFullScreenVideoTest extends AwTestBase {
mTestContainerView =
createAwTestContainerViewOnMainSync(mContentsClient);
mContentViewCore = mTestContainerView.getContentViewCore();
+ mWebContents = mTestContainerView.getAwContents().getWebContents();
enableJavaScriptOnUiThread(mTestContainerView.getAwContents());
mTestContainerView.getAwContents().getSettings().setFullscreenSupported(true);
mWebServer = new VideoTestWebServer(
@@ -60,7 +63,7 @@ public class AwContentsClientFullScreenVideoTest extends AwTestBase {
doOnShowAndHideCustomViewTest(new Runnable() {
@Override
public void run() {
- DOMUtils.exitFullscreen(mContentViewCore);
+ DOMUtils.exitFullscreen(mWebContents);
}
});
}
@@ -69,8 +72,7 @@ public class AwContentsClientFullScreenVideoTest extends AwTestBase {
@Feature({"AndroidWebView"})
public void testOnShowCustomViewAndPlayWithHtmlControl() throws Throwable {
doOnShowCustomViewTest();
- Assert.assertFalse(DOMUtils.hasVideoEnded(
- mContentViewCore, VideoTestWebServer.VIDEO_ID));
+ Assert.assertFalse(DOMUtils.hasVideoEnded(mWebContents, VideoTestWebServer.VIDEO_ID));
// Click the html play button that is rendered above the video right in the middle
// of the custom view. Note that we're not able to get the precise location of the
@@ -80,8 +82,7 @@ public class AwContentsClientFullScreenVideoTest extends AwTestBase {
AwContentsClientFullScreenVideoTest.this);
touchCommon.singleClickView(mContentsClient.getCustomView());
- Assert.assertTrue(DOMUtils.waitForEndOfVideo(
- mContentViewCore, VideoTestWebServer.VIDEO_ID));
+ Assert.assertTrue(DOMUtils.waitForEndOfVideo(mWebContents, VideoTestWebServer.VIDEO_ID));
}
@MediumTest
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698