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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html

Issue 2727663003: Move task.describe to audit.define arg (Closed)
Patch Set: Fix up expected results 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-max-contexts.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html
index 2fecbc4d58cf4689e8757ecd12d05df2e29e8f92..dfae1acc127919dbb546972521f0bdf11eac0dc7 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-channels.html
@@ -14,52 +14,48 @@ let audit = Audit.createTaskRunner();
let context;
let source;
-audit.define("validate .buffer",
- function(task, should) {
- task.describe(
- "AudioBufferSourceNode validates AudioBuffer in .buffer attribute setter"
- );
- context = new AudioContext();
- source = context.createBufferSource();
+audit.define(
+ {
+ label: 'validate .buffer',
+ description: 'Validatation of AudioBuffer in .buffer attribute setter'
+ },
+ function(task, should) {
+ context = new AudioContext();
+ source = context.createBufferSource();
- // Make sure we can't set to something which isn't an AudioBuffer.
- should(function() {
+ // Make sure we can't set to something which isn't an AudioBuffer.
+ should(function() {
source.buffer = 57;
- }, "source.buffer = 57")
- .throw("TypeError");
+ }, 'source.buffer = 57').throw('TypeError');
- should(function() {
+ should(function() {
source.buffer = null;
- }, "source.buffer = null")
- .throw("TypeError");
+ }, 'source.buffer = null').throw('TypeError');
- // Check that mono buffer can be set.
- should(function() {
+ // Check that mono buffer can be set.
+ should(function() {
let monoBuffer = context.createBuffer(1, 1024, context.sampleRate);
let testSource = context.createBufferSource();
testSource.buffer = monoBuffer;
- }, "Setting source with mono buffer")
- .notThrow();
+ }, 'Setting source with mono buffer').notThrow();
- // Check that stereo buffer can be set.
- should(function() {
+ // Check that stereo buffer can be set.
+ should(function() {
let stereoBuffer = context.createBuffer(2, 1024, context.sampleRate);
let testSource = context.createBufferSource();
testSource.buffer = stereoBuffer;
- }, "Setting source with stereo buffer")
- .notThrow();
+ }, 'Setting source with stereo buffer').notThrow();
- // Check buffers with more than two channels.
- for (let i = 3; i < 10; ++i) {
- should(function() {
+ // Check buffers with more than two channels.
+ for (let i = 3; i < 10; ++i) {
+ should(function() {
let buffer = context.createBuffer(i, 1024, context.sampleRate);
let testSource = context.createBufferSource();
testSource.buffer = buffer;
- }, "Setting source with " + i + " channels buffer")
- .notThrow();
- }
- task.done();
- });
+ }, 'Setting source with ' + i + ' channels buffer').notThrow();
+ }
+ task.done();
+ });
audit.run();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-max-contexts.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698