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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html

Issue 2695113003: Convert StereoPanner Audit tests to testharness (Closed)
Patch Set: Fix typo 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
Index: third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html b/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
index 65947be045807f25fdcffedd80352d23afaebd41..faccd038c05933afeaace47f3b7fd6b765930ed2 100644
--- a/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
+++ b/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
@@ -2,16 +2,14 @@
<html>
<head>
- <script src="../../resources/js-test.js"></script>
+ <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>
</head>
<body>
<script>
- description('Test if StereoPannerNode producing glitches by crossing zero.');
- window.jsTestIsAsync = true;
-
var sampleRate = 44100;
var renderDuration = 0.5;
@@ -42,7 +40,8 @@
// samples are identical, the transition has not started.
while (chanL[index-1] === chanL[index] || chanR[index-1] === chanR[index]) {
if (++index >= input.length) {
- testFailed('No transition found in the channel data.');
+ Should(false, 'Transition in the channel data')
+ .summarize('found', 'not found');
return null;
}
}
@@ -52,13 +51,16 @@
// the transition is still ongoing.
while (chanL[index-1] !== chanL[index] || chanR[index-1] !== chanR[index]) {
if (++index >= input.length) {
- testFailed('A transition found but the buffer ended prematurely.');
+ Should(false, 'Transition found')
+ .summarize('', 'but the buffer ended prematurely');
return null;
}
}
end = index;
- testPassed('Transition found between sample #' + start + ' and #' + end + '.');
+ Should('Transition found between sample #' + start + ' and #' + end,
+ true)
+ .summarize('correctly', 'incorrectly');
return {
left: chanL.subarray(start, end),
@@ -171,7 +173,6 @@
audit.defineTask('finish-test', function (done) {
done();
- finishJSTest();
});
audit.runTasks(
@@ -179,8 +180,6 @@
'positive-to-negative',
'finish-test'
);
-
- successfullyParsed = true;
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698