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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTarget-timeConstant-0.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-setTarget-timeConstant-0.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html
index 9445843ee881b5436929aeda1fb2372245af3369..03b08f05d2539ba6a3c36a35d2893f3bd779aef1 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html
@@ -4,7 +4,7 @@
<title>Test setTargetAtTime with timeConstant=0</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
- <script src="../resources/audio-testing.js"></script>
+ <script src="../resources/audit.js"></script>
</head>
<body>
@@ -31,7 +31,7 @@
var audit = Audit.createTaskRunner();
- audit.defineTask("timeconstant-0", function (taskDone) {
+ audit.define("timeconstant-0", (task, should) => {
var context = new OfflineAudioContext(1, renderFrames, sampleRate);
// Simple constant source for testing.
@@ -67,22 +67,16 @@
Math.ceil(targetValueInfo[k + 1].frame) : renderFrames;
var value = targetValueInfo[k].value;
- success = Should(
+ should(result.slice(startFrame, endFrame),
"Output for frame [" + startFrame + ", " + endFrame +
- ")",
- result.slice(startFrame, endFrame))
- .beConstantValueOf(value) && success;
+ ")")
+ .beConstantValueOf(value);
}
- Should("setTargetAtTime with timeConstant=0", success)
- .summarize(
- "handled correctly",
- "handled incorrectly");
-
- }).then(taskDone);
+ }).then(() => task.done());
});
- audit.runTasks();
+ audit.run();
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698