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

Side by Side Diff: chrome/browser/resources/file_manager/common/js/error_util.js

Issue 247123002: Move Files.app files to ui/file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the test failure on non-chromeos Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 'use strict';
6
7 /**
8 * This variable is checked in SelectFileDialogExtensionBrowserTest.
9 * @type {number}
10 */
11 window.JSErrorCount = 0;
12
13 /**
14 * Count uncaught exceptions.
15 */
16 window.onerror = function() { window.JSErrorCount++; };
17
18 // Overrides console.error() to count errors.
19 /**
20 * @param {...Object} var_args Message to be logged.
21 */
22 console.error = (function() {
23 var orig = console.error;
24 return function() {
25 window.JSErrorCount++;
26 return orig.apply(this, arguments);
27 };
28 })();
29
30 // Overrides console.assert() to count errors.
31 /**
32 * @param {boolean} condition If false, log a message and stack trace.
33 * @param {...Object} var_args Objects to.
34 */
35 console.assert = (function() {
36 var orig = console.assert;
37 return function(condition) {
38 if (!condition)
39 window.JSErrorCount++;
40 return orig.apply(this, arguments);
41 };
42 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698