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

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

Issue 2794383002: Add WebVR device capability e2e test (Closed)
Patch Set: Address nits Created 3 years, 8 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_device_capabilities_match_expectations.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 3e5b997089660ab785c1cef7a07a47877755d5a8..f9641096f679a0c9590a8afbe0b733f309fba736 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
@@ -12,6 +12,7 @@ import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_V
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_VIEWER_NON_DAYDREAM;
import static org.chromium.chrome.test.util.ChromeRestriction.RESTRICTION_TYPE_WEBVR_SUPPORTED;
+import android.os.Build;
import android.support.test.filters.LargeTest;
import android.support.test.filters.MediumTest;
import android.support.test.filters.SmallTest;
@@ -327,7 +328,7 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
mockChecker.setMockReturnValue(checkerReturnValue);
VrShellDelegate.getInstanceForTesting().overrideVrCoreVersionCheckerForTesting(mockChecker);
String testName = "generic_webvr_page";
- loadUrl(getHtmlTestFile(testName), 10);
+ loadUrl(getHtmlTestFile(testName), PAGE_LOAD_TIMEOUT_S);
String displayFound = "VRDisplay Found";
String barPresent = "InfoBar present";
if (checkerReturnValue == VrCoreVersionChecker.VR_READY) {
@@ -406,4 +407,17 @@ public class WebVrTest extends ChromeTabbedActivityTestBase {
public void testInfoBarNotPresentWhenVrServicesNotSupported() throws InterruptedException {
infoBarTestHelper(VrCoreVersionChecker.VR_NOT_SUPPORTED);
}
+
+ /**
+ * Tests that the reported WebVR capabilities match expectations on the
+ * devices the WebVR tests are run on continuously.
+ */
+ @MediumTest
+ public void testDeviceCapabilitiesMatchExpectations() throws InterruptedException {
+ String testName = "test_device_capabilities_match_expectations";
+ loadUrl(getHtmlTestFile(testName), PAGE_LOAD_TIMEOUT_S);
+ assertTrue("VRDisplayFound", vrDisplayFound(mWebContents));
+ executeStepAndWait("stepCheckDeviceCapabilities('" + Build.DEVICE + "')", mWebContents);
+ endTest(mWebContents);
+ }
}
« no previous file with comments | « no previous file | chrome/test/data/android/webvr_instrumentation/html/test_device_capabilities_match_expectations.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698