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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html

Issue 2675973003: Convert Oscillator sweep tests to testharness (Closed)
Patch Set: Address review comments. Created 3 years, 10 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 | third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
index 076beeeb6ed1b96ad42c64e35cd147cf2dc1a125..ca8bda5e3268c08eeec48268791753defaf56f5e 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
@@ -2,21 +2,34 @@
<html>
<head>
<title>Test Oscillator Node: custom</title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <script src="../resources/audit-util.js"></script>
+ <script src="../resources/audit.js"></script>
<script src="../resources/buffer-loader.js"></script>
- <script src="../../resources/js-test.js"></script>
<script src="../resources/oscillator-testing.js"></script>
</head>
<body>
<script>
- description("Test Custom Oscillator with Exponential Sweep");
-
+ let audit = Audit.createTaskRunner();
var tester = OscillatorTestingUtils;
- // The thresholds are experimentally determined.
- tester.setThresholds({snr: 80.21, maxDiff: 4.88, diffCount: 15016});
- tester.runTest("custom");
- successfullyParsed = true;
+ audit.define("test", (task, should) => {
+ let context = new OfflineAudioContext(1, tester.sampleRate *
+ tester.lengthInSeconds, tester.sampleRate);
+
+ // The thresholds are experimentally determined.
+ tester.setThresholds({
+ snr: 80.21,
+ maxDiff: 4.88,
+ diffCount: 15016
+ });
+ tester.runTest(context, "custom",
+ "Custom Oscillator with Exponential Sweep", task, should);
+ });
+
+ audit.run();
</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698