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

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

Issue 2348373002: AudioBufferSourceOptions.buffer should be nullable. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/constructor/convolver.html » ('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> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test Constructor: AudioBufferSource</title> 4 <title>Test Constructor: AudioBufferSource</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/audio-testing.js"></script> 7 <script src="../resources/audio-testing.js"></script>
8 <script src="audionodeoptions.js"></script> 8 <script src="audionodeoptions.js"></script>
9 </head> 9 </head>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 .beEqualTo(factoryNode[name]) && success; 76 .beEqualTo(factoryNode[name]) && success;
77 } 77 }
78 } 78 }
79 79
80 Should("AudioBufferSourceNode constructed", success) 80 Should("AudioBufferSourceNode constructed", success)
81 .summarize("correctly", "incorrectly"); 81 .summarize("correctly", "incorrectly");
82 82
83 taskDone(); 83 taskDone();
84 }); 84 });
85 85
86 audit.defineTask("nullable buffer", function (taskDone) {
87 var node;
88 var success = true;
89
90 var options = { buffer: null };
91
92 success = Should("node = new AudioBufferSourceNode(c, " + JSON.stringify (options), function () {
93 node = new AudioBufferSourceNode(context, options);
94 }).notThrow();
95
96 success = Should("node.buffer", node.buffer)
97 .beEqualTo(null);
98
99 Should("Null buffer in constructor handled", success)
100 .summarize(
101 "correctly",
102 "incorrectly");
103
104 taskDone();
105 });
106
86 audit.defineTask("constructor options", function (taskDone) { 107 audit.defineTask("constructor options", function (taskDone) {
87 var node; 108 var node;
88 var success = true; 109 var success = true;
89 110
90 var buffer = context.createBuffer(2, 1000, context.sampleRate); 111 var buffer = context.createBuffer(2, 1000, context.sampleRate);
91 112
92 var options = { 113 var options = {
93 buffer: buffer, 114 buffer: buffer,
94 detune: .5, 115 detune: .5,
95 loop: true, 116 loop: true,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Should("AudioBufferSource with options cosntructed", success) 151 Should("AudioBufferSource with options cosntructed", success)
131 .summarize("correctly", "incorrectly"); 152 .summarize("correctly", "incorrectly");
132 153
133 taskDone(); 154 taskDone();
134 }); 155 });
135 156
136 audit.runTasks(); 157 audit.runTasks();
137 </script> 158 </script>
138 </body> 159 </body>
139 </html> 160 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/constructor/convolver.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698