| testRunner.waitUntilDone(); |
| document.getElementById("logger").innerHTML += msg + "<br>"; |
| if (timeoutCount == 20) { |
| log("No connect event seen in 20 run loop spins. Yay."); |
| function handleGamepadConnect() |
| log("Connect event seen! Should NOT have been seen"); |
| addEventListener("gamepadconnected", handleGamepadConnect); |
| // Connecting the gamepad and changing axis values should *not* make it visible. |
| // Only button presses should expose it. |
| testRunner.setMockGamepadDetails(0, "Test Joystick", 2, 2); |
| testRunner.connectMockGamepad(0); |
| testRunner.setMockGamepadAxisValue(0, 0, 0.7); |
| testRunner.setMockGamepadAxisValue(0, 1, -1.0); |
| <body onload="runTest();"> |