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

Unified Diff: chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html

Issue 2588703003: Add WebVR WebVR E2E test capabilities via Android instrumentation (Closed)
Patch Set: Simplify Javascript code slightly Created 3 years, 10 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/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html
diff --git a/chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html b/chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html
new file mode 100644
index 0000000000000000000000000000000000000000..5932657580b72b6d7865da4533412ce041f11281
--- /dev/null
+++ b/chrome/test/data/android/webvr_instrumentation/html/test_nfc_fires_onvrdisplayactivate.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<!--
+Tests that scanning the Daydream View NFC tag on supported devices fires the
+ondisplayactivate event
+-->
+<html>
+ <head>
+ <style>
Lei Lei 2017/02/16 22:04:49 You can put those CSS code in a css file and inclu
bsheedy 2017/02/16 23:30:13 Done.
+ html, body {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ }
+ #webgl-canvas {
+ box-sizing: border-box;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ }
+ #log {
+ display: none;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="webgl-canvas"></canvas>
+ <script src="../../../../../../third_party/WebKit/LayoutTests/resources/testharness.js"></script>
+ <script src="../resources/webvr_e2e.js"></script>
+ <script src="../resources/webvr_boilerplate.js"></script>
Lei Lei 2017/02/16 22:04:49 I think you can remove this file in this test case
bsheedy 2017/02/16 23:30:13 Done.
+ <script>
+ // Don't need to actually present for this test, so remove the listener
+ window.removeEventListener("vrdisplayactivate", onVrRequestPresent);
+
+ var t = async_test("NFC scan fires the vrdisplayactivate event");
+ window.addEventListener("vrdisplayactivate", () => {t.done();}, false);
+ // NFC scan triggered after page load
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698