Chromium Code Reviews| 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'); |
| }; |