| Index: chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html
|
| diff --git a/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html b/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..582e06be6e0a8a57ffe59cc6c82aba127192bd95
|
| --- /dev/null
|
| +++ b/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html
|
| @@ -0,0 +1,39 @@
|
| +<!doctype html>
|
| +<!--
|
| +Tests that screen taps aren't registered while in VR when viewer is
|
| +Daydream View
|
| +-->
|
| +<html>
|
| + <head>
|
| + <link rel="stylesheet" type="text/css" href="../resources/webvr_e2e.css">
|
| + </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>
|
| + <script>
|
| + var t = async_test("Screen taps not registered when in VR w/ DD View");
|
| + window.addEventListener("vrdisplaypresentchange",
|
| + () => {finishJavascriptStep();}, false);
|
| + var numTaps = 0;
|
| + webglCanvas.addEventListener("click", () => {numTaps++;}, false);
|
| +
|
| + function stepVerifyNoInitialTaps() {
|
| + t.step( () => {
|
| + assert_equals(numTaps, 0, "No initial taps");
|
| + });
|
| + finishJavascriptStep();
|
| + }
|
| +
|
| + function stepVerifyNoAdditionalTaps() {
|
| + t.step_func_done( () => {
|
| + // We expect 1 tap from entering VR
|
| + assert_equals(numTaps, 1,
|
| + "Only tap one tap registered after two taps given");
|
| + })();
|
| + }
|
| +
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|