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

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

Issue 2859533003: WebVR: lock focus while presenting to presenting window (Closed)
Patch Set: Update comment + fix comment line lengths 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
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 248d64f134c961a52d0556d10005cbab3061343e..8efb5285c86d046fb527b14978ae8e0cd2bbae77 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
@@ -23,8 +23,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
- * End-to-end tests for WebVR using the WebVR test framework from
- * VrTestBase.
+ * End-to-end tests for WebVR using the WebVR test framework from VrTestBase.
*/
@CommandLineFlags.Add("enable-webvr")
@Restriction(RESTRICTION_TYPE_WEBVR_SUPPORTED)
@@ -45,8 +44,8 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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)
@@ -58,8 +57,7 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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)
@@ -90,8 +88,8 @@ public class WebVrTest extends VrTestBase {
}
/**
- * Tests that Daydream controller clicks are registered as screen taps when
- * the viewer is a Daydream View.
+ * Tests that Daydream controller clicks are registered as screen taps when the viewer is a
+ * Daydream View.
*/
@LargeTest
@Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM)
@@ -110,8 +108,7 @@ public class WebVrTest extends VrTestBase {
}
/**
- * Tests that screen touches are still registered when the viewer is
- * Cardboard.
+ * Tests that screen touches are still registered when the viewer is Cardboard.
*/
/*
@MediumTest
@@ -147,9 +144,9 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -202,8 +199,8 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -211,8 +208,7 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -220,8 +216,7 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -229,8 +224,8 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -238,8 +233,8 @@ public class WebVrTest extends VrTestBase {
}
/**
- * 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 {
@@ -249,4 +244,16 @@ public class WebVrTest extends VrTestBase {
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);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698