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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-method-chaining.html

Issue 2632373003: Throw correct error when connecting to different context. (Closed)
Patch Set: Update tests Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-method-chaining-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 3
4 <head> 4 <head>
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 <script src="../resources/audit-util.js"></script> 6 <script src="../resources/audit-util.js"></script>
7 <script src="../resources/audio-testing.js"></script> 7 <script src="../resources/audio-testing.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // not have the second output, so it should throw. 118 // not have the second output, so it should throw.
119 Should('Connecting with an invalid output', function () { 119 Should('Connecting with an invalid output', function () {
120 gain1.connect(gain2, 1).connect(contextA.destination); 120 gain1.connect(gain2, 1).connect(contextA.destination);
121 }).throw('IndexSizeError'); 121 }).throw('IndexSizeError');
122 122
123 // Test if the second connection throws correctly. The contextB's 123 // Test if the second connection throws correctly. The contextB's
124 // destination is not compatible with the nodes from contextA, thus the 124 // destination is not compatible with the nodes from contextA, thus the
125 // first connection succeeds but the second one should throw. 125 // first connection succeeds but the second one should throw.
126 Should('Connecting to a node from the different context', function () { 126 Should('Connecting to a node from the different context', function () {
127 gain1.connect(gain2).connect(contextB.destination); 127 gain1.connect(gain2).connect(contextB.destination);
128 }).throw('SyntaxError'); 128 }).throw('InvalidAccessError');
129 129
130 done(); 130 done();
131 }); 131 });
132 132
133 // Task: verify if the method chaining actually works. 133 // Task: verify if the method chaining actually works.
134 audit.defineTask('verification', function (done) { 134 audit.defineTask('verification', function (done) {
135 // We pick the lowest sample rate allowed to run the test efficiently. 135 // We pick the lowest sample rate allowed to run the test efficiently.
136 var context = new OfflineAudioContext(1, 128, 3000); 136 var context = new OfflineAudioContext(1, 128, 3000);
137 137
138 var constantBuffer = createConstantBuffer(context, 1, 1.0); 138 var constantBuffer = createConstantBuffer(context, 1, 1.0);
(...skipping 27 matching lines...) Expand all
166 'invalid-operation', 166 'invalid-operation',
167 'verification', 167 'verification',
168 'finish' 168 'finish'
169 ); 169 );
170 170
171 successfullyParsed = true; 171 successfullyParsed = true;
172 </script> 172 </script>
173 </body> 173 </body>
174 174
175 </html> 175 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-method-chaining-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698