Commit 58a98bd1 authored by bsheedy's avatar bsheedy Committed by Commit Bot

Enable some VR browser tests on Cardboard

Enables some VR tests that were previously restricted to only run with
Daydream View paired to also run with Cardboard paired. Not all VR browser
tests were switched over due to some requiring Daydream View-only features
(controller input, NFC scanning) as well as crbug.com/734792

Bug: 734757
Change-Id: I64b2988ff3a24f7d5f31194d77d6290086de50be
Reviewed-on: https://chromium-review.googlesource.com/540456Reviewed-by: default avatarBiao She <bshe@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480863}
parent 81e33d3b
...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.vr_shell; ...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.vr_shell;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S; import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_DEVICE_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;
import android.support.test.filters.MediumTest; import android.support.test.filters.MediumTest;
...@@ -36,7 +37,7 @@ import java.util.concurrent.TimeoutException; ...@@ -36,7 +37,7 @@ import java.util.concurrent.TimeoutException;
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell", ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell",
"enable-webvr"}) "enable-webvr"})
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) @Restriction(RESTRICTION_TYPE_DEVICE_DAYDREAM)
public class VrFeedbackInfoBarTest { public class VrFeedbackInfoBarTest {
@Rule @Rule
...@@ -138,6 +139,7 @@ public class VrFeedbackInfoBarTest { ...@@ -138,6 +139,7 @@ public class VrFeedbackInfoBarTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testExitPresentationInVr() throws InterruptedException, TimeoutException { public void testExitPresentationInVr() throws InterruptedException, TimeoutException {
// Enter VR presentation mode. // Enter VR presentation mode.
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
......
...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.vr_shell; ...@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.vr_shell;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S; import static org.chromium.chrome.browser.vr_shell.VrTestRule.PAGE_LOAD_TIMEOUT_S;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_LONG_MS;
import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS; import static org.chromium.chrome.browser.vr_shell.VrTestRule.POLL_TIMEOUT_SHORT_MS;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_DEVICE_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;
import android.support.test.filters.MediumTest; import android.support.test.filters.MediumTest;
...@@ -40,7 +41,7 @@ import java.util.concurrent.TimeoutException; ...@@ -40,7 +41,7 @@ import java.util.concurrent.TimeoutException;
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell", ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell",
"enable-webvr"}) "enable-webvr"})
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM) @Restriction(RESTRICTION_TYPE_DEVICE_DAYDREAM)
public class VrShellNavigationTest { public class VrShellNavigationTest {
@Rule @Rule
public VrTestRule mVrTestRule = new VrTestRule(); public VrTestRule mVrTestRule = new VrTestRule();
...@@ -158,6 +159,7 @@ public class VrShellNavigationTest { ...@@ -158,6 +159,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrTo2d() public void testWebVrTo2d()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
...@@ -173,6 +175,7 @@ public class VrShellNavigationTest { ...@@ -173,6 +175,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrToWebVr() public void testWebVrToWebVr()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
...@@ -188,6 +191,7 @@ public class VrShellNavigationTest { ...@@ -188,6 +191,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrPresentingTo2d() public void testWebVrPresentingTo2d()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
...@@ -204,6 +208,7 @@ public class VrShellNavigationTest { ...@@ -204,6 +208,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrPresentingToWebVr() public void testWebVrPresentingToWebVr()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
...@@ -220,6 +225,7 @@ public class VrShellNavigationTest { ...@@ -220,6 +225,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrFullscreenTo2d() public void testWebVrFullscreenTo2d()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
...@@ -236,6 +242,7 @@ public class VrShellNavigationTest { ...@@ -236,6 +242,7 @@ public class VrShellNavigationTest {
*/ */
@Test @Test
@MediumTest @MediumTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public void testWebVrFullscreenToWebVr() public void testWebVrFullscreenToWebVr()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S); mVrTestRule.loadUrlAndAwaitInitialization(TEST_PAGE_WEBVR_URL, PAGE_LOAD_TIMEOUT_S);
......
...@@ -39,7 +39,6 @@ import java.util.concurrent.TimeoutException; ...@@ -39,7 +39,6 @@ import java.util.concurrent.TimeoutException;
@RunWith(ChromeJUnit4ClassRunner.class) @RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell"}) ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG, "enable-features=VrShell"})
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
public class VrShellTransitionTest { public class VrShellTransitionTest {
@Rule @Rule
public VrTestRule mVrTestRule = new VrTestRule(); public VrTestRule mVrTestRule = new VrTestRule();
...@@ -127,6 +126,7 @@ public class VrShellTransitionTest { ...@@ -127,6 +126,7 @@ public class VrShellTransitionTest {
*/ */
@Test @Test
@CommandLineFlags.Add("enable-webvr") @CommandLineFlags.Add("enable-webvr")
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
@MediumTest @MediumTest
public void testExitPresentationWebVrToVrShell() public void testExitPresentationWebVrToVrShell()
throws IllegalArgumentException, InterruptedException, TimeoutException { throws IllegalArgumentException, InterruptedException, TimeoutException {
......
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