OLD | NEW |
(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 get the events.") |
| 7 window.jsTestIsAsync = true; |
| 8 |
| 9 if (!window.gamepadController) { |
| 10 debug("This test cannot work without gamepadController."); |
| 11 } |
| 12 |
| 13 window.addEventListener('gamepadconnected', function() {}); |
| 14 window.addEventListener('gamepadconnected', function() { |
| 15 testPassed("gamepadconnected event recieved"); |
| 16 finishJSTest(); |
| 17 }); |
| 18 |
| 19 setTimeout(function() { |
| 20 testFailed("gamepadconnected event should have been recieved."); |
| 21 }, 50); |
| 22 |
| 23 gamepadController.connect(0); |
| 24 gamepadController.dispatchConnected(0); |
| 25 |
| 26 </script> |
| 27 </html> |
OLD | NEW |