Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: LayoutTests/webaudio/audionode.html

Issue 14028011: Made AudioNode an EventTarget (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/audionode-expected.txt » ('j') | Source/modules/webaudio/AudioNode.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698