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..d48f7e8c8a4ef24e024ac7264a90c2635ced5d31 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 (self.hasOwnProperty(errorType) && error instanceof self[errorType]) |
+ this._testPassed('threw ' + errorType + ': ' + error.message); |
else |
this._testFailed('threw ' + error.name + ' instead of ' + exception); |
} |