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

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

Issue 2223613002: WaveShaperNode should copy its curve. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 4 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/waveshaper-copy-curve.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
index 09f2bf7081920d1f4bb9b6ebfb742a810dd2233c..5cbe92c150b07aa9938853951645f4b81ed64729 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
@@ -604,9 +604,11 @@ var Should = (function () {
// Result:
// "PASS Zero is equal to 0."
ShouldModel.prototype.beEqualTo = function (value) {
- var type = typeof value;
- this._assert(type === 'number' || type === 'string',
- 'value should be number or string for', value);
+ if (value != null) {
+ var type = typeof value;
+ this._assert(type === 'number' || type === 'string' || type === 'boolean',
+ 'value should be number, string, or boolean for', value);
+ }
this._checkNaN(value, 'EXPECTED');
@@ -1138,6 +1140,22 @@ var Should = (function () {
}.bind(this));
};
+ // A summary message
+ //
+ // Example:
+ // Should("Summary1", true).summarize("passed1", "failed1");
+ // Should("Summary2", false).summarize("passed2", "failed2");
+ // Result:
+ // "PASS Summary1: passed1."
+ // "FAIL Summary2: failed2."
+ ShouldModel.prototype.summarize = function (pass, fail) {
+ if (this.target)
+ this._testPassed(pass);
+ else
+ this._testFailed(fail);
+ return this._success;
+ }
+
// Should() method.
//
// |desc| is the description of the task or check and |target| is a value
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/waveshaper-copy-curve.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698