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 {
/**
* 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
@MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testNativeNavigationAndInteraction()
throws IllegalArgumentException, InterruptedException {
for (String url : NATIVE_URLS_OF_INTEREST) {
......
......@@ -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_TIMEOUT_LONG_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_OR_STANDALONE;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM;
......@@ -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
@MediumTest
@DisableIf.
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})
public void testScreenTapsNotRegistered() throws InterruptedException {
screenTapsNotRegisteredImpl(
......@@ -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
@MediumTest
@DisableIf
.Build(message = "Flaky on K/L crbug.com/762126",
sdk_is_less_than = Build.VERSION_CODES.M)
@Restriction(RESTRICTION_TYPE_SVR)
@CommandLineFlags
.Remove({"enable-webvr"})
@CommandLineFlags.Add({"enable-features=WebXR"})
......@@ -743,8 +748,20 @@ public class WebXrVrInputTest {
PAGE_LOAD_TIMEOUT_S);
WebXrVrTestFramework.runJavaScriptOrFail("requestPermission({audio:true})",
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());
mWebXrVrTestFramework.enterSessionWithUserGestureOrFail(mTestRule.getWebContents());
// The permission toasts automatically show for ~5 seconds when entering an immersive
......
......@@ -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.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 android.os.Build;
......@@ -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
@MediumTest
@Restriction(RESTRICTION_TYPE_SVR)
public void testPoseDataUnfocusedTab() throws InterruptedException {
testPoseDataUnfocusedTabImpl(
WebVrTestFramework.getFileUrlForHtmlTestFile("test_pose_data_unfocused_tab"),
......@@ -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
@MediumTest
@Restriction(RESTRICTION_TYPE_SVR)
@CommandLineFlags
.Remove({"enable-webvr"})
@CommandLineFlags.Add({"enable-features=WebXR"})
......@@ -137,8 +144,20 @@ public class WebXrVrTabTest {
WebXrVrTestFramework.runJavaScriptOrFail(
"requestPermission({audio:true}, true /* storeValue */)", 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());
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