Index: chrome/browser/resources/file_manager/js/error_counter.js |
diff --git a/chrome/browser/resources/file_manager/js/error_counter.js b/chrome/browser/resources/file_manager/js/error_counter.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4e61be880a7d2af5045eeea4b876b78f3eb7e609 |
--- /dev/null |
+++ b/chrome/browser/resources/file_manager/js/error_counter.js |
@@ -0,0 +1,16 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+'use strict'; |
+ |
+/** |
+ * This variable is checked in SelectFileDialogExtensionBrowserTest. |
+ * @type {number} |
+ */ |
+window.JSErrorCount = 0; |
+ |
+/** |
+ * Count uncaught exceptions. |
+ */ |
+window.onerror = function() { window.JSErrorCount++; }; |