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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.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
Index: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.html b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.html
index 53be604c6b10bef29fa96890f7e0605da0cfc685..78f0706e9a9995e91c34baa566af112c4552ac05 100644
--- a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.html
+++ b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-promise.html
@@ -42,31 +42,35 @@
// Create an offline context and verify that both the oncomplete and
// promise are returned with the same stuff.
- audit.define("test", (task, should) => {
- task.describe(
- "OfflineAudioContext.startRendering Promise with oncomplete");
- context = new OfflineAudioContext(contextChannels, renderFrames,
- sampleRate);
+ audit.define(
+ {
+ label: 'test',
+ description:
+ 'OfflineAudioContext.startRendering Promise with oncomplete'
+ },
+ (task, should) => {
+ context = new OfflineAudioContext(
+ contextChannels, renderFrames, sampleRate);
- var buffer = context.createBuffer(contextChannels, renderFrames,
- sampleRate);
- for (var k = 0; k < renderFrames; ++k) {
- buffer.getChannelData(0)[k] = 1;
- buffer.getChannelData(1)[k] = 2;
- }
+ var buffer =
+ context.createBuffer(contextChannels, renderFrames, sampleRate);
+ for (var k = 0; k < renderFrames; ++k) {
+ buffer.getChannelData(0)[k] = 1;
+ buffer.getChannelData(1)[k] = 2;
+ }
- var source = context.createBufferSource();
- source.buffer = buffer;
- source.connect(context.destination);
- source.start();
+ var source = context.createBufferSource();
+ source.buffer = buffer;
+ source.connect(context.destination);
+ source.start();
- context.oncomplete = (event) => {
- checkResult(task, should, event);
- };
+ context.oncomplete = (event) => {
+ checkResult(task, should, event);
+ };
- promise = context.startRendering();
+ promise = context.startRendering();
- });
+ });
audit.run();
</script>

Powered by Google App Engine
This is Rietveld 408576698