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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js

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/resources/stereopanner-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
index 60d947b4a9b9ac0d198ce995ad825af370167c88..297af9a9f8b3c8e3b4cc7163afed49d6abf85a64 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/stereopanner-testing.js
@@ -176,6 +176,7 @@ var StereoPannerTest = (function () {
Test.prototype.showResult = function () {
+ /*
hongchan 2017/02/17 18:36:19 Please remove commented out sections.
Raymond Toy 2017/02/17 19:18:41 Done.
if (this.impulseIndex === gNodesToCreate) {
testPassed('Number of impulses matches the number of panner nodes.');
} else {
@@ -187,7 +188,11 @@ var StereoPannerTest = (function () {
);
this.success = false;
}
+ */
+ Should("Number of impulses found", this.impulseIndex)
+ .beEqualTo(gNodesToCreate);
+ /*
if (this.errors.length === 0) {
testPassed('All impulses at expected offsets.');
} else {
@@ -201,7 +206,11 @@ var StereoPannerTest = (function () {
}
this.success = false;
}
+ */
+ Should("Number of impulse at the wrong offset", this.errors.length)
+ .beEqualTo(0);
+ /*
if (this.maxErrorL <= this.maxAllowedError) {
testPassed('Left channel gain values are correct.');
} else {
@@ -211,7 +220,12 @@ var StereoPannerTest = (function () {
);
this.success = false;
}
+ */
+ Should("Left channel error magnitude", this.maxErrorL)
+ .beLessThanOrEqualTo(this.maxAllowedError);
+
+ /*
if (this.maxErrorR <= this.maxAllowedError) {
testPassed('Right channel gain values are correct.');
} else {
@@ -221,14 +235,22 @@ var StereoPannerTest = (function () {
);
this.success = false;
}
+ */
+
+ Should("Right channel error magnitude", this.maxErrorR)
+ .beLessThanOrEqualTo(this.maxAllowedError);
};
Test.prototype.finish = function () {
+ /*
if (this.success)
testPassed(this.description + ': passed.');
else
testFailed(this.description + ': failed.');
+ */
+ Should(this.description, this.success)
+ .summarize('passed', 'failed');
};

Powered by Google App Engine
This is Rietveld 408576698