Commit 0792b666 authored by bsheedy's avatar bsheedy Committed by Commit Bot

Fix failing VR Vega tests

Fixes or disables the tests that were consistently failing on the vega
standalone device. A few tests required special casing standalones
due to them always being in the VR Browser, while a few others are
simply disabled because they don't make sense on standalone devices.

Bug: 876946
Change-Id: Ia27e76b79ee6be2af0a7429e111d2fe57a1c532d
Reviewed-on: https://chromium-review.googlesource.com/c/1354654Reviewed-by: default avatarBill Orr <billorr@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612746}
parent 6416cf38
...@@ -555,10 +555,12 @@ public class VrBrowserNavigationTest { ...@@ -555,10 +555,12 @@ public class VrBrowserNavigationTest {
/** /**
* Tests that navigation to/from native pages works properly and that interacting with the * Tests that navigation to/from native pages works properly and that interacting with the
* screen doesn't cause issues. See crbug.com/737167. * screen doesn't cause issues. See crbug.com/737167. Disabled on standalones because they
* don't have touchscreens, so the mouseSingleClickView causes issues.
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testNativeNavigationAndInteraction() public void testNativeNavigationAndInteraction()
throws IllegalArgumentException, InterruptedException { throws IllegalArgumentException, InterruptedException {
for (String url : NATIVE_URLS_OF_INTEREST) { for (String url : NATIVE_URLS_OF_INTEREST) {
......
...@@ -8,6 +8,7 @@ import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S ...@@ -8,6 +8,7 @@ import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S
import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_CHECK_INTERVAL_SHORT_MS; import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_CHECK_INTERVAL_SHORT_MS;
import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_LONG_MS; import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_LONG_MS;
import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS; import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_SVR;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM;
...@@ -96,12 +97,14 @@ public class WebXrVrInputTest { ...@@ -96,12 +97,14 @@ public class WebXrVrInputTest {
} }
/** /**
* Tests that screen touches are not registered when in VR. * Tests that screen touches are not registered when in VR. Disabled on standalones because
* they don't have touchscreens.
*/ */
@Test @Test
@MediumTest @MediumTest
@DisableIf. @DisableIf.
Build(message = "Flaky on K/L crbug.com/762126", sdk_is_less_than = Build.VERSION_CODES.M) Build(message = "Flaky on K/L crbug.com/762126", sdk_is_less_than = Build.VERSION_CODES.M)
@Restriction(RESTRICTION_TYPE_SVR)
@XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL}) @XrActivityRestriction({XrActivityRestriction.SupportedActivity.ALL})
public void testScreenTapsNotRegistered() throws InterruptedException { public void testScreenTapsNotRegistered() throws InterruptedException {
screenTapsNotRegisteredImpl( screenTapsNotRegisteredImpl(
...@@ -110,13 +113,15 @@ public class WebXrVrInputTest { ...@@ -110,13 +113,15 @@ public class WebXrVrInputTest {
} }
/** /**
* Tests that screen touches are not registered when in an immersive session. * Tests that screen touches are not registered when in an immersive session. Disabled on
* standalones because they don't have touchscreens.
*/ */
@Test @Test
@MediumTest @MediumTest
@DisableIf @DisableIf
.Build(message = "Flaky on K/L crbug.com/762126", .Build(message = "Flaky on K/L crbug.com/762126",
sdk_is_less_than = Build.VERSION_CODES.M) sdk_is_less_than = Build.VERSION_CODES.M)
@Restriction(RESTRICTION_TYPE_SVR)
@CommandLineFlags @CommandLineFlags
.Remove({"enable-webvr"}) .Remove({"enable-webvr"})
@CommandLineFlags.Add({"enable-features=WebXR"}) @CommandLineFlags.Add({"enable-features=WebXR"})
...@@ -743,8 +748,20 @@ public class WebXrVrInputTest { ...@@ -743,8 +748,20 @@ public class WebXrVrInputTest {
PAGE_LOAD_TIMEOUT_S); PAGE_LOAD_TIMEOUT_S);
WebXrVrTestFramework.runJavaScriptOrFail("requestPermission({audio:true})", WebXrVrTestFramework.runJavaScriptOrFail("requestPermission({audio:true})",
POLL_TIMEOUT_SHORT_MS, mTestRule.getWebContents()); POLL_TIMEOUT_SHORT_MS, mTestRule.getWebContents());
PermissionUtils.waitForPermissionPrompt();
PermissionUtils.acceptPermissionPrompt(); // Accept the permission prompt. Standalone devices need to be special cased since they
// will be in the VR Browser.
if (TestVrShellDelegate.isOnStandalone()) {
NativeUiUtils.enableMockedInput();
NativeUiUtils.performActionAndWaitForVisibilityStatus(
UserFriendlyElementName.BROWSING_DIALOG, true /* visible */, () -> {});
NativeUiUtils.waitForUiQuiescence();
NativeUiUtils.clickFallbackUiPositiveButton();
} else {
PermissionUtils.waitForPermissionPrompt();
PermissionUtils.acceptPermissionPrompt();
}
WebXrVrTestFramework.waitOnJavaScriptStep(mTestRule.getWebContents()); WebXrVrTestFramework.waitOnJavaScriptStep(mTestRule.getWebContents());
mWebXrVrTestFramework.enterSessionWithUserGestureOrFail(mTestRule.getWebContents()); mWebXrVrTestFramework.enterSessionWithUserGestureOrFail(mTestRule.getWebContents());
// The permission toasts automatically show for ~5 seconds when entering an immersive // The permission toasts automatically show for ~5 seconds when entering an immersive
......
...@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.vr; ...@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.vr;
import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S; import static org.chromium.chrome.browser.vr.XrTestFramework.PAGE_LOAD_TIMEOUT_S;
import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS; import static org.chromium.chrome.browser.vr.XrTestFramework.POLL_TIMEOUT_SHORT_MS;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_SVR;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE; import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_DAYDREAM_OR_STANDALONE;
import android.os.Build; import android.os.Build;
...@@ -66,10 +67,13 @@ public class WebXrVrTabTest { ...@@ -66,10 +67,13 @@ public class WebXrVrTabTest {
} }
/** /**
* Tests that non-focused tabs cannot get pose information. * Tests that non-focused tabs cannot get pose information. Disabled on standalones because
* they will always be in the VR Browser, and thus shouldn't be getting inline poses even
* if the tab is focused.
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_SVR)
public void testPoseDataUnfocusedTab() throws InterruptedException { public void testPoseDataUnfocusedTab() throws InterruptedException {
testPoseDataUnfocusedTabImpl( testPoseDataUnfocusedTabImpl(
WebVrTestFramework.getFileUrlForHtmlTestFile("test_pose_data_unfocused_tab"), WebVrTestFramework.getFileUrlForHtmlTestFile("test_pose_data_unfocused_tab"),
...@@ -77,10 +81,13 @@ public class WebXrVrTabTest { ...@@ -77,10 +81,13 @@ public class WebXrVrTabTest {
} }
/** /**
* Tests that non-focused tabs don't get WebXR rAFs called. * Tests that non-focused tabs don't get WebXR rAFs called. Disabled on standalones because
* they will always be in the VR Browser, and thus shouldn't be getting inline poses even
* if the tab is focused.
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_SVR)
@CommandLineFlags @CommandLineFlags
.Remove({"enable-webvr"}) .Remove({"enable-webvr"})
@CommandLineFlags.Add({"enable-features=WebXR"}) @CommandLineFlags.Add({"enable-features=WebXR"})
...@@ -137,8 +144,20 @@ public class WebXrVrTabTest { ...@@ -137,8 +144,20 @@ public class WebXrVrTabTest {
WebXrVrTestFramework.runJavaScriptOrFail( WebXrVrTestFramework.runJavaScriptOrFail(
"requestPermission({audio:true}, true /* storeValue */)", POLL_TIMEOUT_SHORT_MS, "requestPermission({audio:true}, true /* storeValue */)", POLL_TIMEOUT_SHORT_MS,
mTestRule.getWebContents()); mTestRule.getWebContents());
PermissionUtils.waitForPermissionPrompt();
PermissionUtils.acceptPermissionPrompt(); // Accept the permission prompt. Standalone devices need to be special cased since they
// will be in the VR Browser.
if (TestVrShellDelegate.isOnStandalone()) {
NativeUiUtils.enableMockedInput();
NativeUiUtils.performActionAndWaitForVisibilityStatus(
UserFriendlyElementName.BROWSING_DIALOG, true /* visible */, () -> {});
NativeUiUtils.waitForUiQuiescence();
NativeUiUtils.clickFallbackUiPositiveButton();
} else {
PermissionUtils.waitForPermissionPrompt();
PermissionUtils.acceptPermissionPrompt();
}
WebXrVrTestFramework.waitOnJavaScriptStep(mTestRule.getWebContents()); WebXrVrTestFramework.waitOnJavaScriptStep(mTestRule.getWebContents());
if (incognito) { if (incognito) {
......
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