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/AudioParam/audioparam-linearRamp-value-attribute.html

Issue 2780433005: Convert AudioParam tests to new Audit (Closed)
Patch Set: Address review comments Created 3 years, 8 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/AudioParam/audioparam-linearRamp-value-attribute.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-linearRamp-value-attribute.html b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-linearRamp-value-attribute.html
index 8e58e690e6f7ee0949f2fa0dc5390c05917e0dd9..0cead29f0d14ab49ba74803dbe82e0df0626286b 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-linearRamp-value-attribute.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-linearRamp-value-attribute.html
@@ -5,7 +5,7 @@
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/audit-util.js"></script>
- <script src="../resources/audio-testing.js"></script>
+ <script src="../resources/audit.js"></script>
</head>
<body>
@@ -23,7 +23,7 @@
// Test that linearRampToValue properly sets the AudioParam .value attribute when the
// linearRamp automation is running.
- audit.defineTask("propagate", function (done) {
+ audit.define("propagate", (task, should) => {
var context = new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate);
// Create a constant source.
@@ -61,25 +61,22 @@
}
var frame = context.currentTime * sampleRate - 1;
- success = Should("gain.gain.value at frame " + frame, gain.gain.value)
- .beEqualTo(expected) && success;
+ success = should(gain.gain.value,
+ "gain.gain.value at frame " + frame)
+ .beEqualTo(expected);
}).then(context.resume.bind(context));
}
// Rock and roll!
source.start();
context.startRendering().then(function (result) {
- Should("linearRampToValue", success)
- .summarize("properly set the AudioParam value",
- "did not properly set the AudioParam value");
- }).then(done);
+ should(success, "linearRampToValue")
+ .message("properly set the AudioParam value",
+ "did not properly set the AudioParam value");
+ }).then(() => task.done());
});
- audit.defineTask("finish", function (done) {
- done();
- });
-
- audit.runTasks();
+ audit.run();
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698