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

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: derive from *Base 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 <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 recieves 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 recieved");
16 finishJSTest();
17 });
18 window.removeEventListener('gamepadconnected', listenerToRemove);
timvolodine 2014/06/16 13:05:17 why is this needed? adding and removing an empty l
kbalazs 2014/06/16 17:01:47 This tests that we still honor the other listeners
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') | Source/modules/gamepad/GamepadDispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698