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

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

Issue 1481793002: Drop [LegacyInterfaceTypeChecking] where trivial in Web Audio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self.hasOwnProperty(errorType) Created 5 years, 1 month 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698