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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html

Issue 2751213002: Reduce runtime of osc-negative-freq test (Closed)
Patch Set: Adjust threshold for mac. 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 | « no previous file | 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/Oscillator/osc-negative-freq.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html
index 32be9c3e5c37a767b9ac42afc2d7a43a54a00e50..3bb552bfb4e386bc019bdc84e0990d0acb1a2ce8 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html
@@ -10,9 +10,13 @@
<body>
<script>
- // Some arbitrary sample rate for the offline context.
- var sampleRate = 48000;
- var renderDuration = 1;
+ // Some arbitrary sample rate for the offline context. But it MUST be
+ // at least twice the oscillator frequency that we're using for the
+ // test. (Currently 440 Hz.)
+ var sampleRate = 16000;
+ // A failyr arbitrary duration that should have at least 1-2 sample
hongchan 2017/03/16 21:46:09 Can we add one empty line before l.17?
Raymond Toy 2017/03/16 22:13:12 Done. And fixed the typo. :-)
+ // periods of the oscillator (at a nominal 440 Hz).
+ var renderDuration = 0.1;
var renderFrames = renderDuration * sampleRate;
var audit = Audit.createTaskRunner();
@@ -21,7 +25,7 @@
runTest({
message: "Sum of positive and negative frequency sine oscillators",
type: "sine",
- threshold: 4.7684e-7
+ threshold: 3.5763e-7
}).then(done);
});
@@ -29,7 +33,7 @@
runTest({
message: "Sum of positive and negative frequency square oscillators",
type: "square",
- threshold: 4.4108e-6
+ threshold: 1.4753e-6
}).then(done);
});
@@ -37,7 +41,7 @@
runTest({
message: "Sum of positive and negative frequency sawtooth oscillators",
type: "sawtooth",
- threshold: 4.3735e-6
+ threshold: 1.4753e-6
}).then(done);
});
@@ -45,7 +49,7 @@
runTest({
message: "Sum of positive and negative frequency triangle oscillators",
type: "triangle",
- threshold: 3.5763e-7
+ threshold: 2.9803e-7
}).then(done);
});
@@ -60,7 +64,7 @@
startFrequency: 440,
endFrequency: sampleRate / 4
},
- threshold: 4.1202e-6
+ threshold: 1.2070e-6
}).then(done);
});
@@ -138,7 +142,7 @@
actual, {
precision: 6
})
- .beCloseToArray(expected, 4.7684e-7);
+ .beCloseToArray(expected, 3.5763e-7);
}).then(done);
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698