Use testRunner instead of layoutTestController in transforms, transitions, traversal...
[WebKit-https.git] / LayoutTests / webaudio / audiochannelmerger-basic.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <script src="../fast/js/resources/js-test-pre.js"></script>
6 <script src="resources/audio-testing.js"></script>
7 </head>
8
9 <body>
10
11 <div id="description"></div>
12 <div id="console"></div>
13
14 <script>
15 description("Basic tests for AudioChannelMerger.");
16
17 function runTest() {
18     if (window.testRunner) {
19         testRunner.dumpAsText();
20         testRunner.waitUntilDone();
21     }
22
23     window.jsTestIsAsync = true;
24
25     var context = new webkitAudioContext();
26
27     try {
28         var mergernode = context.createChannelMerger(0);
29         testFailed("Exception should be thrown for numberOfInputs <= 0.");
30     } catch(e) {
31         testPassed("Exception was thrown for numberOfInputs <= 0.");
32     }
33
34     try {
35         var mergernode = context.createChannelMerger(33);
36         testFailed("Exception should be thrown for numberOfInputs >= 32.");
37     } catch(e) {
38         testPassed("Exception was thrown for numberOfInputs >= 32.");
39     }
40
41     try {
42         var mergernode = context.createChannelMerger(32);
43         testPassed("AudioChannelMerger created successfully with numberOfInputs = 32.");
44     } catch(e) {
45         testFailed("Failed to create AudioChannelMerger with numberOfInputs = 32.");
46     }
47
48     try {
49         var mergernode = context.createChannelMerger();
50         testPassed("AudioChannelMerger created successfully with empty parameter.");
51     } catch(e) {
52         testFailed("Failed to create AudioChannelMerger with empty parameter.");
53     }
54
55     finishJSTest();
56 }
57
58 runTest();
59
60 </script>
61
62 <script src="../fast/js/resources/js-test-post.js"></script>
63 </body>
64 </html>