Index: chrome/browser/resources/file_manager/js/mock_chrome.js |
diff --git a/chrome/browser/resources/file_manager/js/mock_chrome.js b/chrome/browser/resources/file_manager/js/mock_chrome.js |
index dcd28d16c74e77cea73233010ce35c113811354b..3aae77b9bf1507d741b3014df4c8b5ebae61d209 100644 |
--- a/chrome/browser/resources/file_manager/js/mock_chrome.js |
+++ b/chrome/browser/resources/file_manager/js/mock_chrome.js |
@@ -697,6 +697,14 @@ chrome.extension = { |
return path.replace('external/', 'file:///persistent/'); |
} |
return path || document.location.href; |
+ }, |
+ |
+ getBackgroundPage: function() { |
+ return window; |
+ }, |
+ |
+ getViews: function() { |
+ return [window]; |
} |
}; |
@@ -720,6 +728,15 @@ chrome.fileBrowserHandler = { |
}; |
/** |
+ * Mock object for |chrome.runtime|. |
+ */ |
+chrome.runtime = { |
+ getBackgroundPage: function(callback) { |
+ setTimeout(function() {callback(window);}, 0); |
+ } |
+}; |
+ |
+/** |
* Mock object for |chrome.tabs|. |
*/ |
chrome.tabs = { |
@@ -791,44 +808,3 @@ chrome.mediaPlayerPrivate = { |
this.popup_ = null; |
} |
}; |
- |
-/** |
- * TODO(olege): Remove once a Chrome with this interface available is released. |
- */ |
-var v8Intl = (function() { |
- |
-var v8Intl = {}; |
- |
-/** |
- * Constructs v8Intl.DateTimeFormat object given optional locales and options |
- * parameters. |
- * |
- * @constructor |
- * @param {Array?} locales Unused in the mock. |
- * @param {Object} options Unused in the mock. |
- */ |
-v8Intl.DateTimeFormat = function(locales, options) { |
- return { |
- format: function(dateValue) { |
- return dateValue.toString(); |
- } |
- }; |
-}; |
- |
-/** |
- * @constructor |
- * @param {Array?} locales Unused in the mock. |
- * @param {Object} options Unused in the mock. |
- */ |
-v8Intl.Collator = function(locales, options) { |
- return { |
- compare: function(a, b) { |
- if (a > b) return 1; |
- if (a < b) return -1; |
- return 0; |
- } |
- }; |
-}; |
- |
-return v8Intl; |
-}()); |