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

Unified Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 10832096: Make FileCopyManager work on harness. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « chrome/browser/resources/file_manager/js/metrics.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
-}());
« no previous file with comments | « chrome/browser/resources/file_manager/js/metrics.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698