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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html

Issue 2782523002: Convert AudioBuffer tests to new Audit (Closed)
Patch Set: Indent some long lines 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 | « third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-copy-channel.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html b/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html
index a6a7a2d18b8012c00c5e612a601e0595720f93ea..9aaa265060a64cdecf837e031522c26f0ca0c64d 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-getChannelData.html
@@ -4,7 +4,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>
<script src="../resources/audioparam-testing.js"></script>
<title>Test AudioBuffer.getChannelData() Returns the Same Object</title>
</head>
@@ -17,32 +17,26 @@
var audit = Audit.createTaskRunner();
- audit.defineTask("buffer-eq", function (done) {
+ audit.define("buffer-eq", (task, should) => {
// Verify that successive calls to getChannelData return the same buffer.
var context = new AudioContext();
var channelCount = 2;
var frameLength = 1000;
var buffer = context.createBuffer(channelCount, frameLength, context.sampleRate);
- var success = true;
for (var c = 0; c < channelCount; ++c) {
var a = buffer.getChannelData(c);
var b = buffer.getChannelData(c);
- //testPassed("a = buffer.getChannelData(" + c + ")");
- //testPassed("b = buffer.getChannelData(" + c + ")");
let message = "buffer.getChannelData(" + c + ")";
- success = Should(message + " === "+ message, a === b)
- .beEqualTo(true) && success;
+ should(a === b, message + " === " + message)
+ .beEqualTo(true);
}
- Should("getChannelData", success)
- .summarize("correctly returned the same buffer",
- "inccorrectly returned the different buffers");
- done();
+ task.done();
});
- audit.defineTask("buffer-not-eq", function (done) {
+ audit.define("buffer-not-eq", (task, should) => {
var context = new AudioContext();
var channelCount = 2;
var frameLength = 1000;
@@ -53,26 +47,16 @@
for (var c = 0; c < channelCount; ++c) {
var a = buffer1.getChannelData(c);
var b = buffer2.getChannelData(c);
- //testPassed("a = buffer1.getChannelData(" + c + ")");
- //testPassed("b = buffer2.getChannelData(" + c + ")");
let message = "getChannelData(" + c + ")";
- success = Should("buffer1." + message + " === buffer2." + message,
- a === b)
+ should(a === b, "buffer1." + message + " === buffer2." + message)
.beEqualTo(false) && success;
}
- Should("getChannelData", success)
- .summarize("correctly returned different buffers",
- "incorrectly returned the same buffers");
- done();
- });
-
- audit.defineTask("finish", function (done) {
- done();
+ task.done();
});
- audit.runTasks();
+ audit.run();
</script>
</body>
</html>
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/AudioBuffer/audiobuffer-copy-channel.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698