Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/VrShellTest.java

Issue 2510873003: Clean up WebVR RequestPresent and make callback asynchronous. (Closed)
Patch Set: Fix FakeVRDevice Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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; 7 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_D AYDREAM;
8 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_N ON_DAYDREAM; 8 import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_N ON_DAYDREAM;
9 9
10 import android.os.SystemClock; 10 import android.os.SystemClock;
(...skipping 17 matching lines...) Expand all
28 28
29 @Override 29 @Override
30 public void startMainActivity() throws InterruptedException { 30 public void startMainActivity() throws InterruptedException {
31 startMainActivityOnBlankPage(); 31 startMainActivityOnBlankPage();
32 } 32 }
33 33
34 private void forceEnterVr() { 34 private void forceEnterVr() {
35 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 35 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
36 @Override 36 @Override
37 public void run() { 37 public void run() {
38 mDelegate.enterVRIfNecessary(false); 38 mDelegate.enterVRIfNecessary();
39 } 39 }
40 }); 40 });
41 } 41 }
42 42
43 private void forceExitVr() { 43 private void forceExitVr() {
44 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 44 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
45 @Override 45 @Override
46 public void run() { 46 public void run() {
47 mDelegate.exitVRIfNecessary(false); 47 mDelegate.exitVRIfNecessary(false);
48 } 48 }
(...skipping 25 matching lines...) Expand all
74 74
75 /** 75 /**
76 * Verifies that browser does not enter VR mode on Non-Daydream-ready device s. 76 * Verifies that browser does not enter VR mode on Non-Daydream-ready device s.
77 */ 77 */
78 @Restriction(RESTRICTION_TYPE_NON_DAYDREAM) 78 @Restriction(RESTRICTION_TYPE_NON_DAYDREAM)
79 @MediumTest 79 @MediumTest
80 public void testEnterExitVrModeUnsupported() { 80 public void testEnterExitVrModeUnsupported() {
81 testEnterExitVrMode(false); 81 testEnterExitVrMode(false);
82 } 82 }
83 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698