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

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

Issue 208943004: Update WebAudio layout tests to use unprefixed AudioContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add console.log to compatibility.js Created 6 years, 9 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
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 <script src="resources/compatibility.js"></script>
8 <script type="text/javascript" src="resources/audio-testing.js"></script> 9 <script type="text/javascript" src="resources/audio-testing.js"></script>
9 <script type="text/javascript" src="../resources/js-test.js"></script> 10 <script type="text/javascript" src="../resources/js-test.js"></script>
10 </head> 11 </head>
11 12
12 <body> 13 <body>
13 <div id="description"></div> 14 <div id="description"></div>
14 <div id="console"></div> 15 <div id="console"></div>
15 16
16 <script> 17 <script>
17 description("Basic test of setting Oscillator node types."); 18 description("Basic test of setting Oscillator node types.");
(...skipping 10 matching lines...) Expand all
28 function runTest() 29 function runTest()
29 { 30 {
30 if (window.testRunner) { 31 if (window.testRunner) {
31 testRunner.dumpAsText(); 32 testRunner.dumpAsText();
32 testRunner.waitUntilDone(); 33 testRunner.waitUntilDone();
33 } 34 }
34 35
35 window.jsTestIsAsync = true; 36 window.jsTestIsAsync = true;
36 37
37 // Create offline audio context. 38 // Create offline audio context.
38 var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeco nds, sampleRate); 39 var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, s ampleRate);
39 var osc = context.createOscillator(); 40 var osc = context.createOscillator();
40 41
41 // Set each possible oscillator type (except CUSTOM) and verify that the typ e is correct. 42 // Set each possible oscillator type (except CUSTOM) and verify that the typ e is correct.
42 // Here we're setting the type using WebIDL enum values which are strings. 43 // Here we're setting the type using WebIDL enum values which are strings.
43 for (var k = 0; k < oscTypes.length - 1; ++k) { 44 for (var k = 0; k < oscTypes.length - 1; ++k) {
44 osc.type = oscTypes[k].type; 45 osc.type = oscTypes[k].type;
45 if (osc.type == oscTypes[k].type) 46 if (osc.type == oscTypes[k].type)
46 testPassed("Oscillator correctly set to " + oscTypes[k].name + " typ e."); 47 testPassed("Oscillator correctly set to " + oscTypes[k].name + " typ e.");
47 else 48 else
48 testFailed("Oscillator set to " + oscTypes[k].name + " type, but ret urns " + oscTypes[osc.type].name + " type."); 49 testFailed("Oscillator set to " + oscTypes[k].name + " type, but ret urns " + oscTypes[osc.type].name + " type.");
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 93 }
93 94
94 runTest(); 95 runTest();
95 successfullyParsed = true; 96 successfullyParsed = true;
96 97
97 </script> 98 </script>
98 99
99 100
100 </body> 101 </body>
101 </html> 102 </html>
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/offlineaudiocontext-constructor-expected.txt ('k') | LayoutTests/webaudio/oscillator-ended.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698