Chromium Code Reviews| 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 a838881c5a688d4502fc8b06e90e07e4cc498399..875891b1ff59f1a5a4c94737ba32bd02da581cff 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js |
| +++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js |
| @@ -597,6 +597,8 @@ var Should = (function () { |
| this._testPassed('threw an exception of type ' + error.name); |
| else if (error.name === errorType) |
| this._testPassed('threw ' + errorType + ': ' + error.message); |
| + else if (errorType in self && error instanceof self[errorType]) |
| + this._testPassed('threw ' + errorType + ': ' + error.message); |
|
Raymond Toy
2015/11/30 19:00:17
My Javascript-fu is too weak to understand what th
philipj_slow
2015/11/30 19:21:59
This is to handle the "native" error types that ha
hongchan
2015/11/30 19:40:40
Okay, the worker part convinced me. However, isn't
philipj_slow
2015/11/30 20:48:30
This assumes that interface objects (TypeError, Do
|
| else |
| this._testFailed('threw ' + error.name + ' instead of ' + exception); |
| } |