| 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
|
|
|