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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-detune-modulation.html

Issue 2783553002: Convert AudioBufferSource tests to new Audit (Closed)
Patch Set: Indent neatly. 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/AudioBufferSource/audiobuffersource-detune-modulation.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-detune-modulation.html b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-detune-modulation.html
index afc7570ec7cae3457104d9c98b04cff31eaa88f1..f19a496aaef09d6dcc829a937ef07865decb732c 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-detune-modulation.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-detune-modulation.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>
<script src="../resources/audiobuffersource-testing.js"></script>
<script src="../resources/buffer-loader.js"></script>
</head>
@@ -23,12 +23,12 @@
// Task: Load the reference file asynchronously. In order to create a new
// reference file, use the task 'generate-reference' below.
- audit.defineTask('load-reference', function (done) {
+ audit.define('load-reference', (task, should) => {
var loader = new BufferLoader(context, [
'audiobuffersource-detune-modulation-expected.wav'
], function (bufferList) {
referenceBuffer = bufferList[0];
- done();
+ task.done();
});
loader.load();
@@ -36,7 +36,7 @@
// Task: Render the actual buffer and compare with the reference.
- audit.defineTask('generate-verify', function (done) {
+ audit.define('generate-verify', (task, should) => {
// With this setting, the detune will be changing continuously and
// repeatedly within the range of [-1200, 1200] around 440Hz, based on the
@@ -50,7 +50,8 @@
// Compare two buffers with arbitrary (yet reasonable) constraints.
// There parameters are determined by try bot experiments.
- compareBuffersWithConstraints(actual, expected, {
+ compareBuffersWithConstraints(should, actual, expected, {
+ prefix: "",
thresholdSNR: 93.31,
thresholdDiffULP: 1.01,
thresholdDiffCount: 0,
@@ -58,11 +59,11 @@
var filename = 'audiobuffersource-detune-modulation-actual.wav';
if (downloadAudioBuffer(renderedBuffer, filename))
- Should("Saved reference file", true).summarize(filename, "");
- }).then(done);
+ should(true, "Saved reference file").message(filename, "");
+ }).then(() => task.done());
});
- audit.runTasks();
+ audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698