OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 'use strict'; | |
6 | |
7 // Stores the app windows OLNY for test purpose. | 5 // Stores the app windows OLNY for test purpose. |
8 // We SHOULD NOT use it as it is except for test, since the files which have | 6 // We SHOULD NOT use it as it is except for test, since the files which have |
9 // the same name will be overridden each other. | 7 // the same name will be overridden each other. |
10 var appWindowsForTest = {}; | 8 var appWindowsForTest = {}; |
11 | 9 |
12 var initializeQueue = new AsyncUtil.Queue(); | 10 var initializeQueue = new AsyncUtil.Queue(); |
13 | 11 |
14 // Initializes the strings. This needs for the volume manager. | 12 // Initializes the strings. This needs for the volume manager. |
15 initializeQueue.run(function(fulfill) { | 13 initializeQueue.run(function(fulfill) { |
16 chrome.fileManagerPrivate.getStrings(function(stringData) { | 14 chrome.fileManagerPrivate.getStrings(function(stringData) { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 chrome.runtime.onMessageExternal.addListener(function(message) { | 103 chrome.runtime.onMessageExternal.addListener(function(message) { |
106 if (message.name !== 'testResourceLoaded') | 104 if (message.name !== 'testResourceLoaded') |
107 return; | 105 return; |
108 var script = document.createElement('script'); | 106 var script = document.createElement('script'); |
109 script.src = | 107 script.src = |
110 'chrome-extension://' + window.testExtensionId + | 108 'chrome-extension://' + window.testExtensionId + |
111 '/common/test_loader.js'; | 109 '/common/test_loader.js'; |
112 document.documentElement.appendChild(script); | 110 document.documentElement.appendChild(script); |
113 }); | 111 }); |
114 } | 112 } |
OLD | NEW |