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

Side by Side Diff: LayoutTests/gamepad/multiple-event-listeners.html

Issue 336693004: Deduplicate DeviceEvent* classes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: oops - fix grammar in test expectation as well 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
« no previous file with comments | « no previous file | LayoutTests/gamepad/multiple-event-listeners-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
5 <script>
6 description("Test that when there are multiple gamepad event listeners and one i s getting removed the others still receive events.");
7 window.jsTestIsAsync = true;
8
9 if (!window.gamepadController) {
10 debug("This test cannot work without gamepadController.");
11 }
12
13 var listenerToRemove = window.addEventListener('gamepadconnected', function() {} );
14 window.addEventListener('gamepadconnected', function() {
15 testPassed("gamepadconnected event received");
16 finishJSTest();
17 });
18 window.removeEventListener('gamepadconnected', listenerToRemove);
19
20 setTimeout(function() {
21 testFailed("gamepadconnected event should have been recieved.");
22 finishJSTest();
23 }, 50);
24
25 if (gamepadController) {
26 gamepadController.connect(0);
27 gamepadController.dispatchConnected(0);
28 }
29
30 </script>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/gamepad/multiple-event-listeners-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698