| Index: third_party/WebKit/LayoutTests/webaudio/resources/audit.js
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
|
| index 117bce61ee63b8cb0aa817ddc72961f881c0b4eb..49536a67fe350ca04e78f8b9a7041f32217d8eb4 100644
|
| --- a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
|
| @@ -357,6 +357,39 @@ window.Audit = (function () {
|
| }
|
|
|
| /**
|
| + * Check if |actual| promise is rejected correctly.
|
| + *
|
| + * @example
|
| + * should(promise, 'My promise').beRejectedWith('_ERROR_').then();
|
| + *
|
| + * @result
|
| + * "PASS My promise rejected correctly with _ERROR_."
|
| + * "FAIL X My promise rejected correctly but got _ACTUAL_ERROR instead of
|
| + * _EXPECTED_ERROR_."
|
| + * "FAIL X My promise resolved incorrectly."
|
| + */
|
| + beRejectedWith() {
|
| + this._processArguments(arguments);
|
| +
|
| + return this._actual.then(
|
| + function() {
|
| + this._assert(false, null, '${actual} resolved incorrectly.');
|
| + }.bind(this),
|
| + function(error) {
|
| + if (this._expected !== error.name) {
|
| + this._assert(
|
| + false, null, '${actual} rejected correctly but got ' +
|
| + error.name + ' instead of ' + this._expected + '.');
|
| + } else {
|
| + this._assert(
|
| + true,
|
| + '${actual} rejected correctly with ' + this._expected + '.',
|
| + null);
|
| + }
|
| + }.bind(this));
|
| + }
|
| +
|
| + /**
|
| * Check if |actual| is a boolean true.
|
| *
|
| * @example
|
|
|