OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <script src="../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../fast/js/resources/js-test-pre.js"></script> |
6 <script type="text/javascript" src="resources/audio-testing.js"></script> | 6 <script type="text/javascript" src="resources/audio-testing.js"></script> |
7 </head> | 7 </head> |
8 | 8 |
9 <body> | 9 <body> |
10 <div id="description"></div> | 10 <div id="description"></div> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 } | 94 } |
95 | 95 |
96 // Create a new context with not enough arguments | 96 // Create a new context with not enough arguments |
97 try { | 97 try { |
98 context2 = new webkitAudioContext(0, 0); | 98 context2 = new webkitAudioContext(0, 0); |
99 testFailed("exception should be thrown when creating audio context with not enough arguments."); | 99 testFailed("exception should be thrown when creating audio context with not enough arguments."); |
100 } catch(e) { | 100 } catch(e) { |
101 testPassed("exception thrown when creating audio context with not enough arguments."); | 101 testPassed("exception thrown when creating audio context with not enough arguments."); |
102 } | 102 } |
103 | 103 |
104 // Ensure it is an EventTarget | |
105 try { | |
106 window.audioNodeIsEventTarget = false; | |
107 audioNode.addEventListener('testEvent', function(){ | |
108 audioNodeIsEventTarget = true; | |
109 }); | |
110 audioNode.dispatchEvent(new Event('testEvent')); | |
111 shouldBeTrue('audioNodeIsEventTarget'); | |
haraken
2013/04/15 00:01:25
Nit: You can write testPassed() line inside the ev
| |
112 } catch(e) { | |
113 testFailed("exception shouldn't be thrown when testing whether audio nod e is an event target"); | |
114 } | |
115 | |
104 finishJSTest(); | 116 finishJSTest(); |
105 } | 117 } |
106 | 118 |
107 runTest(); | 119 runTest(); |
108 | 120 |
109 </script> | 121 </script> |
110 | 122 |
111 <script src="../fast/js/resources/js-test-post.js"></script> | 123 <script src="../fast/js/resources/js-test-post.js"></script> |
112 </body> | 124 </body> |
113 </html> | 125 </html> |
OLD | NEW |