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

Side by Side Diff: LayoutTests/webaudio/oscillator-basic.html

Issue 18182009: WaveTable name has changed to PeriodicWave (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix global constructors test Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/webaudio/oscillator-basic-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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 2
3 <!-- 3 <!--
4 Create an oscillator of each type and verify that the type is set correctly. 4 Create an oscillator of each type and verify that the type is set correctly.
5 --> 5 -->
6 <html> 6 <html>
7 <head> 7 <head>
8 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/> 8 <link rel="stylesheet" href="../fast/js/resources/js-test-style.css"/>
9 <script type="text/javascript" src="resources/audio-testing.js"></script> 9 <script type="text/javascript" src="resources/audio-testing.js"></script>
10 <script type="text/javascript" src="../fast/js/resources/js-test-pre.js"></scrip t> 10 <script type="text/javascript" src="../fast/js/resources/js-test-pre.js"></scrip t>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 osc.type = oscTypes[k].integerType; 55 osc.type = oscTypes[k].integerType;
56 if (osc.type == oscTypes[k].type) 56 if (osc.type == oscTypes[k].type)
57 testPassed("Oscillator correctly set to " + oscTypes[k].name + " typ e using legacy integer value."); 57 testPassed("Oscillator correctly set to " + oscTypes[k].name + " typ e using legacy integer value.");
58 else 58 else
59 testFailed("Oscillator set to " + oscTypes[k].name + " type, but ret urns " + oscTypes[osc.type].name + " type using legacy integer value."); 59 testFailed("Oscillator set to " + oscTypes[k].name + " type, but ret urns " + oscTypes[osc.type].name + " type using legacy integer value.");
60 } 60 }
61 61
62 // Now set a custom oscillator 62 // Now set a custom oscillator
63 var coeffA = new Float32Array([0, 1, 0.5]); 63 var coeffA = new Float32Array([0, 1, 0.5]);
64 var coeffB = new Float32Array([0, 0, 0]); 64 var coeffB = new Float32Array([0, 0, 0]);
65 var wavetable = context.createWaveTable(coeffA, coeffB); 65 var wave = context.createPeriodicWave(coeffA, coeffB);
66 osc.setWaveTable(wavetable); 66 osc.setPeriodicWave(wave);
67 if (osc.type == "custom") 67 if (osc.type == "custom")
68 testPassed("Oscillator correctly set to CUSTOM type using setWaveTable." ); 68 testPassed("Oscillator correctly set to CUSTOM type using setPeriodicWav e.");
69 else 69 else
70 testFailed("Oscillator set to CUSTOM type, but returns " + oscTypes[osc. type].name + " type."); 70 testFailed("Oscillator set to CUSTOM type, but returns " + oscTypes[osc. type].name + " type.");
71 71
72 // Try setting some invalid types 72 // Try setting some invalid types
73 try { 73 try {
74 osc.type = "custom"; 74 osc.type = "custom";
75 testFailed("Directly setting oscillator type to CUSTOM did not throw exc eption."); 75 testFailed("Directly setting oscillator type to CUSTOM did not throw exc eption.");
76 } catch (e) { 76 } catch (e) {
77 testPassed("Directly setting oscillator type to CUSTOM correctly throws exception."); 77 testPassed("Directly setting oscillator type to CUSTOM correctly throws exception.");
78 } 78 }
(...skipping 15 matching lines...) Expand all
94 94
95 runTest(); 95 runTest();
96 successfullyParsed = true; 96 successfullyParsed = true;
97 97
98 </script> 98 </script>
99 99
100 <script src="../fast/js/resources/js-test-post.js"></script> 100 <script src="../fast/js/resources/js-test-post.js"></script>
101 101
102 </body> 102 </body>
103 </html> 103 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/oscillator-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698