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 audioNode.addEventListener('testEvent', function(){ |
| 107 testPassed("AudioNode is an EventTarget"); |
| 108 }); |
| 109 audioNode.dispatchEvent(new Event('testEvent')); |
| 110 } catch(e) { |
| 111 testFailed("exception shouldn't be thrown when testing whether audio nod
e is an event target"); |
| 112 } |
| 113 |
104 finishJSTest(); | 114 finishJSTest(); |
105 } | 115 } |
106 | 116 |
107 runTest(); | 117 runTest(); |
108 | 118 |
109 </script> | 119 </script> |
110 | 120 |
111 <script src="../fast/js/resources/js-test-post.js"></script> | 121 <script src="../fast/js/resources/js-test-post.js"></script> |
112 </body> | 122 </body> |
113 </html> | 123 </html> |
OLD | NEW |