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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java

Issue 2881233002: WebVR: lock focus while presenting to presenting window (Closed)
Patch Set: Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/android/webvr_instrumentation/html/test_presentation_locks_focus.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java
index 58444e37367e0e5d32ab4677482de89a95e38c94..e17c5c8ab85c67ce745b9f7f4002d013776b602e 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrTest.java
@@ -239,8 +239,8 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that scanning the Daydream View NFC tag on supported devices
- * fires the vrdisplayactivate event.
+ * Tests that scanning the Daydream View NFC tag on supported devices fires the
+ * vrdisplayactivate event.
*/
@SmallTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
@@ -252,8 +252,7 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that screen touches are not registered when the viewer is a
- * Daydream View.
+ * Tests that screen touches are not registered when the viewer is a Daydream View.
*/
@LargeTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
@@ -318,9 +317,9 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Helper function to run the tests checking for the upgrade/install InfoBar
- * being present since all that differs is the value returned by VrCoreVersionChecker
- * and a couple asserts.
+ * Helper function to run the tests checking for the upgrade/install InfoBar being present since
+ * all that differs is the value returned by VrCoreVersionChecker and a couple asserts.
+ *
* @param checkerReturnValue The value to have the VrCoreVersionChecker return
*/
private void infoBarTestHelper(int checkerReturnValue) throws InterruptedException {
@@ -373,8 +372,8 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that the upgrade/install VR Services InfoBar is not present when
- * VR Services is installed and up to date.
+ * Tests that the upgrade/install VR Services InfoBar is not present when VR Services is
+ * installed and up to date.
*/
@MediumTest
public void testInfoBarNotPresentWhenVrServicesCurrent() throws InterruptedException {
@@ -382,8 +381,7 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that the upgrade VR Services InfoBar is present when
- * VR Services is outdated.
+ * Tests that the upgrade VR Services InfoBar is present when VR Services is outdated.
*/
@MediumTest
public void testInfoBarPresentWhenVrServicesOutdated() throws InterruptedException {
@@ -391,8 +389,7 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that the install VR Services InfoBar is present when VR
- * Services is missing.
+ * Tests that the install VR Services InfoBar is present when VR Services is missing.
*/
@MediumTest
public void testInfoBarPresentWhenVrServicesMissing() throws InterruptedException {
@@ -400,8 +397,8 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that the install VR Services InfoBar is not present when VR
- * is not supported on the device.
+ * Tests that the install VR Services InfoBar is not present when VR is not supported on the
+ * device.
*/
@MediumTest
public void testInfoBarNotPresentWhenVrServicesNotSupported() throws InterruptedException {
@@ -409,8 +406,8 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
}
/**
- * Tests that the reported WebVR capabilities match expectations on the
- * devices the WebVR tests are run on continuously.
+ * Tests that the reported WebVR capabilities match expectations on the devices the WebVR tests
+ * are run on continuously.
*/
@MediumTest
public void testDeviceCapabilitiesMatchExpectations() throws InterruptedException {
@@ -420,4 +417,16 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
executeStepAndWait("stepCheckDeviceCapabilities('" + Build.DEVICE + "')", mWebContents);
endTest(mWebContents);
}
+
+ /**
+ * Tests that focus is locked to the presenting display for purposes of VR input.
+ */
+ @MediumTest
+ public void testPresentationLocksFocus() throws InterruptedException {
+ String testName = "test_presentation_locks_focus";
+ loadUrl(getHtmlTestFile(testName), PAGE_LOAD_TIMEOUT_S);
+ enterVrTapAndWait(mWebContents);
+ waitOnJavaScriptStep(mWebContents);
+ endTest(mWebContents);
+ }
}
« no previous file with comments | « no previous file | chrome/test/data/android/webvr_instrumentation/html/test_presentation_locks_focus.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698