OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../fast/js/resources/js-test-pre.js"></script> | 3 <script src="../fast/js/resources/js-test-pre.js"></script> |
4 <script> | 4 <script> |
5 if (window.gamepadController) | 5 if (window.gamepadController) |
6 { | 6 { |
7 // start all disconnected | 7 // start all disconnected |
8 gamepadController.disconnect(0); | 8 gamepadController.disconnect(0); |
9 gamepadController.disconnect(1); | 9 gamepadController.disconnect(1); |
10 gamepadController.disconnect(2); | 10 gamepadController.disconnect(2); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 shouldBe("navigator.webkitGetGamepads()[0].buttons[1]", "0.0"); | 42 shouldBe("navigator.webkitGetGamepads()[0].buttons[1]", "0.0"); |
43 shouldBe("navigator.webkitGetGamepads()[0].axes.length", "2"); | 43 shouldBe("navigator.webkitGetGamepads()[0].axes.length", "2"); |
44 shouldBe("navigator.webkitGetGamepads()[0].axes[0]", "0.5"); | 44 shouldBe("navigator.webkitGetGamepads()[0].axes[0]", "0.5"); |
45 shouldBe("navigator.webkitGetGamepads()[0].axes[1]", "-1.0"); | 45 shouldBe("navigator.webkitGetGamepads()[0].axes[1]", "-1.0"); |
46 } | 46 } |
47 else | 47 else |
48 { | 48 { |
49 console.log("FAIL: no gamepadController available.") | 49 console.log("FAIL: no gamepadController available.") |
50 } | 50 } |
51 </script> | 51 </script> |
52 <script src="../fast/js/resources/js-test-post.js"></script> | |
53 <p>Typical polling access to gamepads contents.</p> | 52 <p>Typical polling access to gamepads contents.</p> |
54 </body> | 53 </body> |
OLD | NEW |