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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/constructor/gain.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: Gain</title> 4 <title>Test Constructor: Gain</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 30 matching lines...) Expand all
41 "correctly threw errors", 41 "correctly threw errors",
42 "did not throw errors in all cases"); 42 "did not throw errors in all cases");
43 43
44 taskDone(); 44 taskDone();
45 }); 45 });
46 46
47 audit.defineTask("default constructor", function (taskDone) { 47 audit.defineTask("default constructor", function (taskDone) {
48 var node; 48 var node;
49 var success = true; 49 var success = true;
50 50
51 success = Should("node = new GainNode(context)", function () { 51 success = Should("node0 = new GainNode(context)", function () {
52 node = new GainNode(context); 52 node = new GainNode(context);
53 }).notThrow(); 53 }).notThrow();
54 success = Should("node instanceof GainNode", 54 success = Should("node0 instanceof GainNode",
55 node instanceof GainNode) 55 node instanceof GainNode)
56 .beEqualTo(true) && success; 56 .beEqualTo(true) && success;
57 57
58 success = Should("node.gain.value", node.gain.value) 58 success = Should("node0.gain.value", node.gain.value)
59 .beEqualTo(1) && success; 59 .beEqualTo(1) && success;
60 60
61 success = Should("node.channelCount", node.channelCount) 61 success = Should("node0.channelCount", node.channelCount)
62 .beEqualTo(2) && success; 62 .beEqualTo(2) && success;
63 success = Should("node.channelCountMode", node.channelCountMode) 63 success = Should("node0.channelCountMode", node.channelCountMode)
64 .beEqualTo("max") && success; 64 .beEqualTo("max") && success;
65 success = Should("node.channelInterpretation", node.channelInterpretatio n) 65 success = Should("node0.channelInterpretation", node.channelInterpretati on)
66 .beEqualTo("speakers") && success; 66 .beEqualTo("speakers") && success;
67 67
68 Should("new GainNode(context)", success) 68 Should("new GainNode(context)", success)
69 .summarize( 69 .summarize(
70 "constructed node with correct attributes", 70 "constructed node with correct attributes",
71 "did not construct correct node correctly") 71 "did not construct correct node correctly")
72 72
73 taskDone(); 73 taskDone();
74 }); 74 });
75 75
76 audit.defineTask("test AudioNodeOptions", function (taskDone) { 76 audit.defineTask("test AudioNodeOptions", function (taskDone) {
77 testAudioNodeOptions(context, "GainNode"); 77 testAudioNodeOptions(context, "GainNode");
78 taskDone(); 78 taskDone();
79 }); 79 });
80 80
81 audit.defineTask("constructor with options", function (taskDone) { 81 audit.defineTask("constructor with options", function (taskDone) {
82 var node; 82 var node;
83 var success = true; 83 var success = true;
84 var options = { 84 var options = {
85 gain: -2, 85 gain: -2,
86 }; 86 };
87 87
88 success = Should("node = new GainNode(c, " + JSON.stringify(options) + " )", function () { 88 success = Should("node1 = new GainNode(c, " + JSON.stringify(options) + ")", function () {
89 node = new GainNode(context, options); 89 node = new GainNode(context, options);
90 }).notThrow(); 90 }).notThrow();
91 success = Should("node instanceof GainNode", 91 success = Should("node1 instanceof GainNode",
92 node instanceof GainNode) 92 node instanceof GainNode)
93 .beEqualTo(true) && success; 93 .beEqualTo(true) && success;
94 94
95 success = Should("node.gain.value", node.gain.value) 95 success = Should("node1.gain.value", node.gain.value)
96 .beEqualTo(options.gain) && success; 96 .beEqualTo(options.gain) && success;
97 97
98 success = Should("node.channelCount", node.channelCount) 98 success = Should("node1.channelCount", node.channelCount)
99 .beEqualTo(2) && success; 99 .beEqualTo(2) && success;
100 success = Should("node.channelCountMode", node.channelCountMode) 100 success = Should("node1.channelCountMode", node.channelCountMode)
101 .beEqualTo("max") && success; 101 .beEqualTo("max") && success;
102 success = Should("node.channelInterpretation", node.channelInterpretatio n) 102 success = Should("node1.channelInterpretation", node.channelInterpretati on)
103 .beEqualTo("speakers") && success; 103 .beEqualTo("speakers") && success;
104 104
105 Should("new GainNode() with options", success) 105 Should("new GainNode() with options", success)
106 .summarize( 106 .summarize(
107 "constructed with correct attributes", 107 "constructed with correct attributes",
108 "was not constructed correctly"); 108 "was not constructed correctly");
109 109
110 taskDone(); 110 taskDone();
111 }); 111 });
112 112
113 audit.runTasks(); 113 audit.runTasks();
114 </script> 114 </script>
115 </body> 115 </body>
116 </html> 116 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698