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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-disconnect.html

Issue 2781123002: Convert ChannelMerger tests to new Audit (Closed)
Patch Set: 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/ChannelMerger/audiochannelmerger-disconnect.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-disconnect.html b/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-disconnect.html
index 295164510a8e351e38e52d67fb0882593024900c..7a7e39e2a93c5e6e053d03cb784228c8d7ab0106 100644
--- a/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-disconnect.html
+++ b/third_party/WebKit/LayoutTests/webaudio/ChannelMerger/audiochannelmerger-disconnect.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>
@@ -22,7 +22,7 @@
// Task: Check if the merger outputs a silent channel when an input is
// disconnected.
- audit.defineTask('silent-disconnect', function (done) {
+ audit.define('silent-disconnect', (task, should) => {
var context = new OfflineAudioContext(numberOfChannels, renderDuration * sampleRate, sampleRate);
var merger = context.createChannelMerger();
var source1 = context.createBufferSource();
@@ -49,7 +49,7 @@
context.startRendering().then(function (buffer) {
// The entire first channel of the output should be 1.
- Should('Channel #0', buffer.getChannelData(0)).beConstantValueOf(1);
+ should(buffer.getChannelData(0), 'Channel #0').beConstantValueOf(1);
// Calculate the first zero index in the second channel.
var channel1 = buffer.getChannelData(1);
@@ -61,20 +61,14 @@
});
// The second channel should contain 1, and 0 after the disconnection.
- Should('Channel #1', channel1).containValues([1, 0]);
- Should('The index of first zero in the channel #1', firstZeroIndex)
+ should(channel1, 'Channel #1').containValues([1, 0]);
+ should(firstZeroIndex, 'The index of first zero in the channel #1')
.beEqualTo(disconnectIndex);
- }).then(done);
+ }).then(() => task.done());
});
- audit.defineTask('finish', function (done) {
- done();
- });
-
- audit.runTasks();
-
- successfullyParsed = true;
+ audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698