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

Side by Side Diff: chrome/test/data/android/webvr_instrumentation/html/test_presentation_locks_focus.html

Issue 2881233002: WebVR: lock focus while presenting to presenting window (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 Tests that when a screen taps causes a frame that isn't presenting to gain
4 focus, that the presenting frame still receives input.
5 -->
6 <html>
7 <head>
8 <link rel="stylesheet" type="text/css" href="../resources/webvr_e2e.css">
9 </head>
10 <body>
11 <canvas id="webgl-canvas"></canvas>
12 <script src="../../../../../../third_party/WebKit/LayoutTests/resources/test harness.js"></script>
13 <script src="../resources/webvr_e2e.js"></script>
14 <script src="../resources/webvr_boilerplate.js"></script>
15 <script>
16 var t = async_test("Focus is locked to presentation");
17 var rafCount = 0;
18 window.addEventListener("vrdisplaypresentchange",
19 () => {finishJavaScriptStep();}, false);
20 window.onfocus = function() {
21 onAnimationFrameCallback = null;
22 setTimeout(function() {
23 document.getElementById('externalframe').contentWindow.focus();
24 }, 1000);
25 };
26 window.onblur = function() {
27 onAnimationFrameCallback = function() {
28 if (rafCount = 3) {
29 finishJavaScriptStep();
30 t.done();
31 }
32 rafCount++;
33 }
34 }
35 </script>
36 <iframe id="externalframe" width="1" height="1" src="about:blank" />
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698