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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/constructor/channelsplitter.html

Issue 2768983002: Fix duplicate test names in WebAudio tests (Closed)
Patch Set: Created 3 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
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test Constructor: ChannelSplitter</title> 4 <title>Test Constructor: ChannelSplitter</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audio-testing.js"></script> 8 <script src="../resources/audio-testing.js"></script>
9 <script src="audionodeoptions.js"></script> 9 <script src="audionodeoptions.js"></script>
10 </head> 10 </head>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 "correctly threw errors", 42 "correctly threw errors",
43 "did not throw errors in all cases"); 43 "did not throw errors in all cases");
44 44
45 taskDone(); 45 taskDone();
46 }); 46 });
47 47
48 audit.defineTask("default constructor", function (taskDone) { 48 audit.defineTask("default constructor", function (taskDone) {
49 var node; 49 var node;
50 var success = true; 50 var success = true;
51 51
52 success = Should("node = new ChannelSplitterNode(context)", function () { 52 success = Should("node0 = new ChannelSplitterNode(context)", function () {
53 node = new ChannelSplitterNode(context); 53 node = new ChannelSplitterNode(context);
54 }).notThrow(); 54 }).notThrow();
55 success = Should("node instanceof ChannelSplitterNode", node instanceof ChannelSplitterNode) 55 success = Should("node0 instanceof ChannelSplitterNode", node instanceof ChannelSplitterNode)
56 .beEqualTo(true) && success; 56 .beEqualTo(true) && success;
57 57
58 success = Should("node.numberOfInputs", node.numberOfInputs) 58 success = Should("node0.numberOfInputs", node.numberOfInputs)
59 .beEqualTo(1) && success; 59 .beEqualTo(1) && success;
60 success = Should("node.numberOfOutputs", node.numberOfOutputs) 60 success = Should("node0.numberOfOutputs", node.numberOfOutputs)
61 .beEqualTo(6) && success; 61 .beEqualTo(6) && success;
62 success = Should("node.channelCount", node.channelCount) 62 success = Should("node0.channelCount", node.channelCount)
63 .beEqualTo(node.numberOfOutputs) && success; 63 .beEqualTo(node.numberOfOutputs) && success;
64 success = Should("node.channelCountMode", node.channelCountMode) 64 success = Should("node0.channelCountMode", node.channelCountMode)
65 .beEqualTo("explicit") && success; 65 .beEqualTo("explicit") && success;
66 success = Should("node.channelInterpretation", node.channelInterpretatio n) 66 success = Should("node0.channelInterpretation", node.channelInterpretati on)
67 .beEqualTo("speakers") && success; 67 .beEqualTo("speakers") && success;
68 68
69 Should("new ChannelSplitterNode(context)", success) 69 Should("new ChannelSplitterNode(context)", success)
70 .summarize( 70 .summarize(
71 "constructed node with correct attributes", 71 "constructed node with correct attributes",
72 "did not construct correct node correctly") 72 "did not construct correct node correctly")
73 73
74 taskDone(); 74 taskDone();
75 }); 75 });
76 76
(...skipping 14 matching lines...) Expand all
91 91
92 audit.defineTask("constructor options", function (taskDone) { 92 audit.defineTask("constructor options", function (taskDone) {
93 var node; 93 var node;
94 var success = true; 94 var success = true;
95 var options = { 95 var options = {
96 numberOfInputs: 3, 96 numberOfInputs: 3,
97 numberOfOutputs: 9, 97 numberOfOutputs: 9,
98 channelInterpretation: "discrete" 98 channelInterpretation: "discrete"
99 }; 99 };
100 100
101 success = Should("node = new ChannelSplitterNode(context, " + JSON.strin gify(options) + ")", function () { 101 success = Should("node1 = new ChannelSplitterNode(context, " + JSON.stri ngify(options) + ")", function () {
102 node = new ChannelSplitterNode(context, options); 102 node = new ChannelSplitterNode(context, options);
103 }).notThrow(); 103 }).notThrow();
104 104
105 success = Should("node.numberOfInputs", node.numberOfInputs) 105 success = Should("node1.numberOfInputs", node.numberOfInputs)
106 .beEqualTo(1) && success; 106 .beEqualTo(1) && success;
107 success = Should("node.numberOfOutputs", node.numberOfOutputs) 107 success = Should("node1.numberOfOutputs", node.numberOfOutputs)
108 .beEqualTo(options.numberOfOutputs) && success; 108 .beEqualTo(options.numberOfOutputs) && success;
109 success = Should("node.channelInterpretation", node.channelInterpretatio n) 109 success = Should("node1.channelInterpretation", node.channelInterpretati on)
110 .beEqualTo(options.channelInterpretation) && success; 110 .beEqualTo(options.channelInterpretation) && success;
111 111
112 options = { numberOfOutputs: 99 }; 112 options = { numberOfOutputs: 99 };
113 success = Should("new ChannelSplitterNode(c, " + JSON.stringify(options) + ")", 113 success = Should("new ChannelSplitterNode(c, " + JSON.stringify(options) + ")",
114 function () { 114 function () {
115 node = new ChannelSplitterNode(context, options); 115 node = new ChannelSplitterNode(context, options);
116 }) 116 })
117 .throw("IndexSizeError") && success; 117 .throw("IndexSizeError") && success;
118 118
119 options = { channelCount: 3 }; 119 options = { channelCount: 3 };
(...skipping 17 matching lines...) Expand all
137 "constructed with correct attributes", 137 "constructed with correct attributes",
138 "was not constructed correctly"); 138 "was not constructed correctly");
139 139
140 taskDone(); 140 taskDone();
141 }); 141 });
142 142
143 audit.runTasks(); 143 audit.runTasks();
144 </script> 144 </script>
145 </body> 145 </body>
146 </html> 146 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698