Index: ui/file_manager/gallery/js/background.js |
diff --git a/ui/file_manager/gallery/js/background.js b/ui/file_manager/gallery/js/background.js |
index 3463f836145bbbf493a17b91de99a4d2c8a45c55..e65a737050bfcf4a9fde155d4aa189cf8666e314 100644 |
--- a/ui/file_manager/gallery/js/background.js |
+++ b/ui/file_manager/gallery/js/background.js |
@@ -222,6 +222,10 @@ if (chrome.app.runtime) { |
// If is is run in the browser test, wait for the test resources are installed |
// as a component extension, and then load the test resources. |
if (chrome.test) { |
+ // Sets a global flag that we are in tests, so other components are aware of |
+ // it. |
+ window.IN_TEST = true; |
+ |
/** @type {string} */ |
window.testExtensionId = 'ejhcmmdhhpdhhgmifplfmjobgegbibkn'; |
chrome.runtime.onMessageExternal.addListener(function(message) { |