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

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

Issue 2695113003: Convert StereoPanner Audit tests to testharness (Closed)
Patch Set: Convert stereopannernode-basic.html 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..255900dc002380bbf896fd4b24ef78f6fcb1a595 100644
--- a/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
+++ b/third_party/WebKit/LayoutTests/webaudio/StereoPanner/stereopannernode-no-glitch.html
@@ -2,15 +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;
hongchan 2017/02/17 18:36:19 I prefer to remove this empty line.
var sampleRate = 44100;
var renderDuration = 0.5;
@@ -42,6 +41,7 @@
// samples are identical, the transition has not started.
while (chanL[index-1] === chanL[index] || chanR[index-1] === chanR[index]) {
if (++index >= input.length) {
+ // TODO(rtoy): Replace this
hongchan 2017/02/17 18:36:19 Not sure what this means. Replace how?
Raymond Toy 2017/02/17 19:18:41 Replaced with Should().summarize().
testFailed('No transition found in the channel data.');
return null;
}
@@ -52,13 +52,18 @@
// the transition is still ongoing.
while (chanL[index-1] !== chanL[index] || chanR[index-1] !== chanR[index]) {
if (++index >= input.length) {
+ // TODO(rtoy): Replace this
testFailed('A transition found but the buffer ended prematurely.');
return null;
}
}
end = index;
- testPassed('Transition found between sample #' + start + ' and #' + end + '.');
+ //testPassed('Transition found between sample #' + start + ' and #' + end + '.');
hongchan 2017/02/17 18:36:19 Commented out, so we should remove this before lan
Raymond Toy 2017/02/17 19:18:41 Done.
+
+ Should('Transition found between sample #' + start + ' and #' + end,
+ true)
+ .summarize('correctly', 'incorrectly');
return {
left: chanL.subarray(start, end),
@@ -171,7 +176,6 @@
audit.defineTask('finish-test', function (done) {
done();
- finishJSTest();
});
audit.runTasks(

Powered by Google App Engine
This is Rietveld 408576698