| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/js-test.js"></script> |
| 3 <script> |
| 4 description("Accessing Navigator Gamepad methods on a closed window."); |
| 2 | 5 |
| 3 <html> | 6 window.jsTestIsAsync = true; |
| 4 <head> | |
| 5 <script src="../resources/js-test.js"></script> | |
| 6 <script src="resources/compatibility.js"></script> | |
| 7 <script src="resources/audio-testing.js"></script> | |
| 8 <script type="text/javascript" src="resources/scriptprocessornode-testing.js"></
script> | |
| 9 </head> | |
| 10 | 7 |
| 11 <body> | 8 var expectedLength = 0; |
| 9 var w; |
| 10 function processMessage(event) { |
| 11 if (event.data == "opened") { |
| 12 w.close(); |
| 13 } else if (event.data == "closed") { |
| 14 shouldBe("w.navigator.getGamepads().length", "expectedLength"); |
| 15 finishJSTest(); |
| 16 } |
| 17 } |
| 12 | 18 |
| 13 <div id="description"></div> | 19 if (window.gamepadController) { |
| 14 <div id="console"></div> | |
| 15 | |
| 16 <script> | |
| 17 description("Tests downmixing an 8-channel source connected to a JavaScriptAudio
Node with 2-channel input."); | |
| 18 | |
| 19 var sampleRate = 44100.0; | |
| 20 var sourceChannels = 8; | |
| 21 var inputChannels = 2; | |
| 22 var outputChannels = 6; | |
| 23 | |
| 24 function runTest() { | |
| 25 if (window.testRunner) { | 20 if (window.testRunner) { |
| 26 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
| 22 testRunner.setCanOpenWindows(); |
| 27 testRunner.waitUntilDone(); | 23 testRunner.waitUntilDone(); |
| 28 } | 24 } |
| 29 | 25 w = window.open('resources/gamepad-detached-no-crash-new-window.html'); |
| 30 window.jsTestIsAsync = true; | 26 expectedLength = w.navigator.getGamepads().length; |
| 31 | 27 window.addEventListener("message", processMessage, false); |
| 32 runJSNodeTest(); | 28 } else { |
| 29 console.log("FAIL: no gamepad controller available.") |
| 33 } | 30 } |
| 34 | |
| 35 runTest(); | |
| 36 | |
| 37 </script> | 31 </script> |
| 38 | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |