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

Side by Side Diff: LayoutTests/gamepad/page-visibility-detach-while-dispatching.html

Issue 306363002: Gamepad: honor page visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: just a comment that it will be better with Oilpan Created 6 years, 6 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 <html>
3 <script src="../resources/js-test.js"></script>
4 <script>
5 description("Test that we don't crash while dispatching pending gamepad events i f the event handler detaches us.");
6
7 if (!window.testRunner || !window.gamepadController)
8 document.write('This test cannot run without testRunner or gamepadController ');
9
10 window.addEventListener('gamepadconnected', function (event) {
11 shouldBeEqualToNumber('event.gamepad.index', 0);
12 shouldBeEqualToNumber('eventCount', 1);
13 document.write('PASS');
14 });
15
16 function start() {
17 testRunner.setPageVisibility('hidden');
18 gamepadController.connect(0);
19 gamepadController.connect(1);
20 testRunner.setPageVisibility('visible');
21 }
22
23 </script>
24 <body onload="start()">
25 FAIL
26 </body>
27 </html>
OLDNEW
« no previous file with comments | « LayoutTests/gamepad/page-visibility.html ('k') | LayoutTests/gamepad/page-visibility-detach-while-dispatching-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698