| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.vr_shell; | 5 package org.chromium.chrome.browser.vr_shell; |
| 6 | 6 |
| 7 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_D
AYDREAM_VIEW; | 7 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_D
AYDREAM_VIEW; |
| 8 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_W
EBVR_SUPPORTED; | 8 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_W
EBVR_SUPPORTED; |
| 9 | 9 |
| 10 import android.support.test.filters.SmallTest; | 10 import android.support.test.filters.SmallTest; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 /** | 221 /** |
| 222 * Tests that a successful requestPresent call actually enters VR | 222 * Tests that a successful requestPresent call actually enters VR |
| 223 */ | 223 */ |
| 224 @SmallTest | 224 @SmallTest |
| 225 public void testRequestPresentEntersVr() throws InterruptedException { | 225 public void testRequestPresentEntersVr() throws InterruptedException { |
| 226 String testName = "test_requestPresent_enters_vr"; | 226 String testName = "test_requestPresent_enters_vr"; |
| 227 loadUrl(getHtmlTestFile(testName), 10); | 227 loadUrl(getHtmlTestFile(testName), 10); |
| 228 assertTrue("VRDisplay found", vrDisplayFound(mWebContents)); | 228 assertTrue("VRDisplay found", vrDisplayFound(mWebContents)); |
| 229 enterVrTapAndWait(mWebContents); | 229 enterVrTapAndWait(mWebContents); |
| 230 assertTrue("VrShellDelegate is in VR", getActivity().getVrShellDelegate(
).isInVR()); | 230 assertTrue("VrShellDelegate is in VR", VrShellDelegate.isInVR()); |
| 231 endTest(mWebContents); | 231 endTest(mWebContents); |
| 232 } | 232 } |
| 233 | 233 |
| 234 /** | 234 /** |
| 235 * Tests that scanning the Daydream View NFC tag on supported devices | 235 * Tests that scanning the Daydream View NFC tag on supported devices |
| 236 * fires the onvrdisplayactivate event. | 236 * fires the onvrdisplayactivate event. |
| 237 */ | 237 */ |
| 238 @SmallTest | 238 @SmallTest |
| 239 @Restriction(RESTRICTION_TYPE_DAYDREAM_VIEW) | 239 @Restriction(RESTRICTION_TYPE_DAYDREAM_VIEW) |
| 240 public void testNfcFiresOnvrdisplayactivate() throws InterruptedException { | 240 public void testNfcFiresOnvrdisplayactivate() throws InterruptedException { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 253 loadUrl(getHtmlTestFile(testName), 10); | 253 loadUrl(getHtmlTestFile(testName), 10); |
| 254 assertTrue("VRDisplay found", vrDisplayFound(mWebContents)); | 254 assertTrue("VRDisplay found", vrDisplayFound(mWebContents)); |
| 255 executeStepAndWait("stepCheckFrameDataWhileFocusedTab()", mWebContents); | 255 executeStepAndWait("stepCheckFrameDataWhileFocusedTab()", mWebContents); |
| 256 | 256 |
| 257 loadUrlInNewTab("about:blank"); | 257 loadUrlInNewTab("about:blank"); |
| 258 | 258 |
| 259 executeStepAndWait("stepCheckFrameDataWhileNonFocusedTab()", mWebContent
s); | 259 executeStepAndWait("stepCheckFrameDataWhileNonFocusedTab()", mWebContent
s); |
| 260 endTest(mWebContents); | 260 endTest(mWebContents); |
| 261 } | 261 } |
| 262 } | 262 } |
| OLD | NEW |