| 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 // check some out of range values. | 7 // check some out of range values. |
| 8 for (var i = -100; i < 100; ++i) | 8 for (var i = -100; i < 100; ++i) |
| 9 { | 9 { |
| 10 gamepadController.connect(i); | 10 gamepadController.connect(i); |
| 11 gamepadController.setId(i, "name"); | 11 gamepadController.setId(i, "name"); |
| 12 for (var j = -100; i < 100; ++i) | 12 for (var j = -100; i < 100; ++i) |
| 13 { | 13 { |
| 14 gamepadController.setButtonCount(i, j); | 14 gamepadController.setButtonCount(i, j); |
| 15 gamepadController.setAxisCount(i, j); | 15 gamepadController.setAxisCount(i, j); |
| 16 gamepadController.setButtonData(i, j, 0.0); | 16 gamepadController.setButtonData(i, j, 0.0); |
| 17 gamepadController.setAxisData(i, j, 0.0); | 17 gamepadController.setAxisData(i, j, 0.0); |
| 18 } | 18 } |
| 19 gamepadController.disconnect(i); | 19 gamepadController.disconnect(i); |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 else | 22 else |
| 23 { | 23 { |
| 24 console.log("FAIL: no gamepadController available.") | 24 console.log("FAIL: no gamepadController available.") |
| 25 } | 25 } |
| 26 </script> | 26 </script> |
| 27 <script src="../fast/js/resources/js-test-post.js"></script> | |
| 28 <p>Range checks; just shouldn't crash.</p> | 27 <p>Range checks; just shouldn't crash.</p> |
| 29 </body> | 28 </body> |
| OLD | NEW |