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

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

Issue 2768583002: Make VR screen tap tests more stable (Closed)
Patch Set: Move VR test library behind flag Created 3 years, 9 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 | « chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered_on_cardboard.html
diff --git a/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered_on_cardboard.html b/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered_on_cardboard.html
index 6fe56a8212e3b9a021bd66ffe920ca1c6ff3578b..7abb84b64e663b7bf6bfba4986179bb61efdd209 100644
--- a/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered_on_cardboard.html
+++ b/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered_on_cardboard.html
@@ -17,7 +17,14 @@ Cardboard
window.addEventListener("vrdisplaypresentchange",
() => {finishJavascriptStep();}, false);
var numTaps = 0;
- webglCanvas.addEventListener("click", () => {numTaps++;}, false);
+ webglCanvas.addEventListener("click",
+ () => {
+ numTaps++;
+ // Notify Java when we've received the tap after entering VR
+ if (numTaps == 2) {
+ t.done();
+ }
+ }, false);
function stepVerifyNoInitialTaps() {
t.step( () => {
@@ -25,15 +32,6 @@ Cardboard
});
finishJavascriptStep();
}
-
- function stepVerifyAdditionalTap() {
- t.step_func_done( () => {
- // We expect 1 tap from entering VR + 1 additional one after
- assert_equals(numTaps, 2,
- "Two taps registered after two taps given");
- })();
- }
-
</script>
</body>
</html>
« no previous file with comments | « chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered_on_daydream.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698