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

Unified Diff: chrome/third_party/mock4js/mock4js.js

Issue 330423005: Fix failure handling in mock4js to throw instead of calling an undefined function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rebase on top of CRLF -> LF conversion Created 6 years, 6 months 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
« no previous file with comments | « chrome/third_party/mock4js/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/third_party/mock4js/mock4js.js
diff --git a/chrome/third_party/mock4js/mock4js.js b/chrome/third_party/mock4js/mock4js.js
index 98e5aa000d71c96801e01172e35cf5edf61ae531..5cd02d518dff1c1202967fc12fe81dce4d282c97 100644
--- a/chrome/third_party/mock4js/mock4js.js
+++ b/chrome/third_party/mock4js/mock4js.js
@@ -122,7 +122,7 @@ Mock4JSException.prototype = {
*/
assertThat = function(expected, argumentMatcher) {
if(!argumentMatcher.argumentMatches(expected)) {
- fail("Expected '"+expected+"' to be "+argumentMatcher.describe());
+ throw new Mock4JSException("Expected '"+expected+"' to be "+argumentMatcher.describe());
}
}
@@ -622,4 +622,4 @@ Mock.prototype = {
}
return msg;
}
-}
+}
« no previous file with comments | « chrome/third_party/mock4js/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698