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

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

Issue 2299883007: Remove video overlay support from WebView (Closed)
Patch Set: Removed another external_video_surface reference Created 4 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/AwContentsClientFullScreenTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
index dc0c8c5610b1ad2c7cf928d4488bfe166b2b97df..d9586a7fa947e00f8828ef7283c06b971e643ff7 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java
@@ -218,101 +218,6 @@ public class AwContentsClientFullScreenTest extends AwTestBase {
DOMUtils.waitForMediaPlay(getWebContentsOnUiThread(), VIDEO_ID);
}
- /*
- @MediumTest
- @Feature({"AndroidWebView"})
- */
- @DisabledTest(message = "crbug.com/597495")
- public void testHolePunchingSurfaceNotCreatedForClearVideo() throws Throwable {
- loadTestPage(VIDEO_TEST_URL);
- assertFalse(DOMUtils.isFullscreen(getWebContentsOnUiThread()));
-
- // Play and verify that a surface view for hole punching is not created.
- // Note that VIDEO_TEST_URL contains clear video.
- tapPlayButton();
- DOMUtils.waitForMediaPlay(getWebContentsOnUiThread(), VIDEO_ID);
- // Wait to ensure that the surface view is not added asynchronously.
- VideoSurfaceViewUtils.waitAndAssertContainsZeroVideoHoleSurfaceViews(this,
- mTestContainerView);
- }
-
- /*
- @MediumTest
- @Feature({"AndroidWebView"})
- */
- @DisabledTest(message = "crbug.com/597495")
- public void testOnShowCustomViewTransfersHolePunchingSurfaceForVideoInsideDiv()
- throws Throwable {
- getInstrumentation().runOnMainSync(new Runnable() {
- @Override
- public void run() {
- mTestContainerView.getAwContents().getSettings().setForceVideoOverlayForTests(true);
- }
- });
-
- loadTestPage(VIDEO_INSIDE_DIV_TEST_URL);
- assertFalse(DOMUtils.isFullscreen(getWebContentsOnUiThread()));
-
- // Play and verify that there is a surface view for hole punching.
- tapPlayButton();
- DOMUtils.waitForMediaPlay(getWebContentsOnUiThread(), VIDEO_ID);
- VideoSurfaceViewUtils.pollAndAssertContainsOneVideoHoleSurfaceView(this,
- mTestContainerView);
-
- // Enter fullscreen and verify that the hole punching surface is transferred. Note
- // that VIDEO_INSIDE_DIV_TEST_URL goes fullscreen on a <div> element, so in fullscreen
- // the video will still be embedded in the page and the hole punching surface required.
- // We need to transfer the external surface so that scrolling is synchronized with the
- // new container view.
- DOMUtils.clickNode(this, mContentViewCore, CUSTOM_FULLSCREEN_CONTROL_ID);
- mContentsClient.waitForCustomViewShown();
- View customView = mContentsClient.getCustomView();
- VideoSurfaceViewUtils.assertContainsZeroVideoHoleSurfaceViews(this, mTestContainerView);
- // Wait to ensure that the surface view stays there after being transfered and not
- // removed asynchronously.
- VideoSurfaceViewUtils.waitAndAssertContainsOneVideoHoleSurfaceView(this, customView);
- }
-
- /*
- @MediumTest
- @Feature({"AndroidWebView"})
- */
- @DisabledTest(message = "crbug.com/597495")
- public void testOnShowCustomViewRemovesHolePunchingSurfaceForVideo() throws Throwable {
- getInstrumentation().runOnMainSync(new Runnable() {
- @Override
- public void run() {
- mTestContainerView.getAwContents().getSettings().setForceVideoOverlayForTests(true);
- }
- });
-
- loadTestPage(VIDEO_TEST_URL);
- assertFalse(DOMUtils.isFullscreen(getWebContentsOnUiThread()));
-
- // Play and verify that there is a surface view for hole punching.
- tapPlayButton();
- DOMUtils.waitForMediaPlay(getWebContentsOnUiThread(), VIDEO_ID);
- VideoSurfaceViewUtils.pollAndAssertContainsOneVideoHoleSurfaceView(this,
- mTestContainerView);
-
- // Enter fullscreen and verify that the surface view is removed. Note that
- // VIDEO_TEST_URL goes fullscreen on the <video> element, so in fullscreen
- // the video will not be embedded in the page and the external surface
- // not longer required.
- DOMUtils.clickNode(this, mContentViewCore, CUSTOM_FULLSCREEN_CONTROL_ID);
- mContentsClient.waitForCustomViewShown();
- View customView = mContentsClient.getCustomView();
- VideoSurfaceViewUtils.assertContainsZeroVideoHoleSurfaceViews(this, mTestContainerView);
- // We need to wait because the surface view is first transfered, and then removed
- // asynchronously.
- VideoSurfaceViewUtils.waitAndAssertContainsZeroVideoHoleSurfaceViews(this, customView);
-
- // Exit fullscreen and verify that the video hole surface is re-created.
- DOMUtils.exitFullscreen(mContentViewCore.getWebContents());
- VideoSurfaceViewUtils.pollAndAssertContainsOneVideoHoleSurfaceView(this,
- mTestContainerView);
- }
-
@MediumTest
@Feature({"AndroidWebView"})
public void testFullscreenNotSupported_video() throws Throwable {
« no previous file with comments | « android_webview/javatests/DEPS ('k') | android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698