Chromium Code Reviews| Index: ui/webui/resources/js/util.js |
| diff --git a/ui/webui/resources/js/util.js b/ui/webui/resources/js/util.js |
| index 980b354bc9d3ddea8b6b88474fd16fddd8a78dd4..22301dffda6d4d6ec575577cab8ee6d3973cd5c1 100644 |
| --- a/ui/webui/resources/js/util.js |
| +++ b/ui/webui/resources/js/util.js |
| @@ -2,6 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +<include src="assert.js"></include> |
|
Dan Beam
2013/04/09 03:56:05
nit: and here, too (no </include>)
Jered
2013/04/09 21:59:38
Done.
|
| + |
| /** |
| * The global object. |
| * @type {!Object} |
| @@ -198,23 +200,6 @@ function isRTL() { |
| } |
| /** |
| - * Simple common assertion API |
| - * @param {*} condition The condition to test. Note that this may be used to |
| - * test whether a value is defined or not, and we don't want to force a |
| - * cast to Boolean. |
| - * @param {string=} opt_message A message to use in any error. |
| - */ |
| -function assert(condition, opt_message) { |
| - 'use strict'; |
| - if (!condition) { |
| - var msg = 'Assertion failed'; |
| - if (opt_message) |
| - msg = msg + ': ' + opt_message; |
| - throw new Error(msg); |
| - } |
| -} |
| - |
| -/** |
| * Get an element that's known to exist by its ID. We use this instead of just |
| * calling getElementById and not checking the result because this lets us |
| * satisfy the JSCompiler type system. |