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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/audit.js

Issue 2693043005: Fix should() to throw with no argument (Closed)
Patch Set: Initial commit Created 3 years, 10 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 | « no previous file | third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f96e85e4036818a08ff57caaa7168aa985a24f85..7e732952a3968ed6ea2c9586d92c71a9b353ce83 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
@@ -951,6 +951,10 @@ window.Audit = (function () {
// Start the assertion chain.
should (actual, actualDescription) {
+ // If no argument is given, we cannot proceed. Halt.
+ if (arguments.length === 0)
+ _throwException('Task.should:: requires at least 1 argument.');
+
return new Should(this, actual, actualDescription);
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/unit-tests/audit.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698