Commit 96c0be24 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW: enable more tests

No change to production logic.

This enables 2 tests which were previously disabled due to flakiness.
The flakiness was fixed in http://crrev/c/1286031, and these appear safe
to enable:

 * testFullscreenForNonVideoElementIsSupportedInSoftwareMode
 * testPowerSaveBlockerIsTransferredToFullscreen

This also cleans up annotations on other disabled tests. It's sufficient
to mark disabled tests as "@DisabledTest" without commenting out other
annotations. It's helpful to actually leave these annotations
uncommented, because it makes enabling the test a one-line change.

Bug: 789306
Test: run_webview_instrumentation_test_apk \
Test: --gtest_filter=AwContentsClientFullScreenTest#* \
Test: --repeat=1000
Change-Id: I497718177d086c46e1553e1f365b23b27de760e4
Reviewed-on: https://chromium-review.googlesource.com/c/1290142Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601647}
parent 63bf30ea
...@@ -71,13 +71,11 @@ public class AwContentsClientFullScreenTest { ...@@ -71,13 +71,11 @@ public class AwContentsClientFullScreenTest {
mTestContainerView.getAwContents().getSettings().setFullscreenSupported(true); mTestContainerView.getAwContents().getSettings().setFullscreenSupported(true);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
@DisableHardwareAccelerationForTest @DisableHardwareAccelerationForTest
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749") // turning this on as an experiment.
public void testFullscreenVideoInSoftwareModeDoesNotDeadlock() throws Throwable { public void testFullscreenVideoInSoftwareModeDoesNotDeadlock() throws Throwable {
// Although fullscreen video is not supported without hardware acceleration // Although fullscreen video is not supported without hardware acceleration
// we should not deadlock if apps try to use it. // we should not deadlock if apps try to use it.
...@@ -88,33 +86,26 @@ public class AwContentsClientFullScreenTest { ...@@ -88,33 +86,26 @@ public class AwContentsClientFullScreenTest {
mContentsClient.waitForCustomViewHidden(); mContentsClient.waitForCustomViewHidden();
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
@DisableHardwareAccelerationForTest @DisableHardwareAccelerationForTest
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749")
public void testFullscreenForNonVideoElementIsSupportedInSoftwareMode() throws Throwable { public void testFullscreenForNonVideoElementIsSupportedInSoftwareMode() throws Throwable {
// Fullscreen for non-video elements is supported and works as expected. Note that // Fullscreen for non-video elements is supported and works as expected. Note that
// this test is the same as testOnShowAndHideCustomViewWithCallback_videoInsideDiv below. // this test is the same as testOnShowAndHideCustomViewWithCallback_videoInsideDiv below.
doTestOnShowAndHideCustomViewWithCallback(VIDEO_INSIDE_DIV_TEST_URL); doTestOnShowAndHideCustomViewWithCallback(VIDEO_INSIDE_DIV_TEST_URL);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithCallback_video() throws Throwable { public void testOnShowAndHideCustomViewWithCallback_video() throws Throwable {
doTestOnShowAndHideCustomViewWithCallback(VIDEO_TEST_URL); doTestOnShowAndHideCustomViewWithCallback(VIDEO_TEST_URL);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithCallback_videoInsideDiv() throws Throwable { public void testOnShowAndHideCustomViewWithCallback_videoInsideDiv() throws Throwable {
...@@ -126,20 +117,16 @@ public class AwContentsClientFullScreenTest { ...@@ -126,20 +117,16 @@ public class AwContentsClientFullScreenTest {
() -> mContentsClient.getExitCallback().onCustomViewHidden()); () -> mContentsClient.getExitCallback().onCustomViewHidden());
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithJavascript_video() throws Throwable { public void testOnShowAndHideCustomViewWithJavascript_video() throws Throwable {
doTestOnShowAndHideCustomViewWithJavascript(VIDEO_TEST_URL); doTestOnShowAndHideCustomViewWithJavascript(VIDEO_TEST_URL);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithJavascript_videoInsideDiv() throws Throwable { public void testOnShowAndHideCustomViewWithJavascript_videoInsideDiv() throws Throwable {
...@@ -151,21 +138,17 @@ public class AwContentsClientFullScreenTest { ...@@ -151,21 +138,17 @@ public class AwContentsClientFullScreenTest {
videoTestUrl, () -> DOMUtils.exitFullscreen(mTestContainerView.getWebContents())); videoTestUrl, () -> DOMUtils.exitFullscreen(mTestContainerView.getWebContents()));
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
// Originally flaked only in multi-process mode (http://crbug.com/616501)
*/
@Test @Test
// Originally flaked only in multi-process mode (http://crbug.com/616501)
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithBackKey_video() throws Throwable { public void testOnShowAndHideCustomViewWithBackKey_video() throws Throwable {
doTestOnShowAndHideCustomViewWithBackKey(VIDEO_TEST_URL); doTestOnShowAndHideCustomViewWithBackKey(VIDEO_TEST_URL);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/618749") @DisabledTest(message = "crbug.com/618749")
public void testOnShowAndHideCustomViewWithBackKey_videoInsideDiv() throws Throwable { public void testOnShowAndHideCustomViewWithBackKey_videoInsideDiv() throws Throwable {
...@@ -296,12 +279,9 @@ public class AwContentsClientFullScreenTest { ...@@ -296,12 +279,9 @@ public class AwContentsClientFullScreenTest {
assertWaitForKeepScreenOnActive(mTestContainerView, false); assertWaitForKeepScreenOnActive(mTestContainerView, false);
} }
/*
@MediumTest @MediumTest
@Feature({"AndroidWebView"}) @Feature({"AndroidWebView"})
*/
@Test @Test
@DisabledTest(message = "crbug.com/808444")
public void testPowerSaveBlockerIsTransferredToFullscreen() throws Throwable { public void testPowerSaveBlockerIsTransferredToFullscreen() throws Throwable {
Assert.assertFalse(DOMUtils.isFullscreen(getWebContentsOnUiThread())); Assert.assertFalse(DOMUtils.isFullscreen(getWebContentsOnUiThread()));
loadTestPage(VIDEO_INSIDE_DIV_TEST_URL); loadTestPage(VIDEO_INSIDE_DIV_TEST_URL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment