Chromium Code Reviews| 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> |