| 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'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @param {Object.<string, string>} stringData String data. | 8 * @param {Object.<string, string>} stringData String data. |
| 9 * @param {VolumeManager} volumeManager Volume manager. | 9 * @param {VolumeManager} volumeManager Volume manager. |
| 10 */ | 10 */ |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 }); | 196 }); |
| 197 | 197 |
| 198 launch(selectedEntriesPromise).catch(function(error) { | 198 launch(selectedEntriesPromise).catch(function(error) { |
| 199 console.error(error.stack || error); | 199 console.error(error.stack || error); |
| 200 }); | 200 }); |
| 201 }); | 201 }); |
| 202 | 202 |
| 203 // If is is run in the browser test, wait for the test resources are installed | 203 // If is is run in the browser test, wait for the test resources are installed |
| 204 // as a component extension, and then load the test resources. | 204 // as a component extension, and then load the test resources. |
| 205 if (chrome.test) { | 205 if (chrome.test) { |
| 206 window.testExtensionId = 'ejhcmmdhhpdhhgmifplfmjobgegbibkn'; |
| 206 chrome.runtime.onMessageExternal.addListener(function(message) { | 207 chrome.runtime.onMessageExternal.addListener(function(message) { |
| 207 if (message.name !== 'testResourceLoaded') | 208 if (message.name !== 'testResourceLoaded') |
| 208 return; | 209 return; |
| 209 var script = document.createElement('script'); | 210 var script = document.createElement('script'); |
| 210 script.src = | 211 script.src = |
| 211 'chrome-extension://ejhcmmdhhpdhhgmifplfmjobgegbibkn' + | 212 'chrome-extension://' + window.testExtensionId + |
| 212 '/gallery/test_loader.js'; | 213 '/common/test_loader.js'; |
| 213 document.documentElement.appendChild(script); | 214 document.documentElement.appendChild(script); |
| 214 }); | 215 }); |
| 215 } | 216 } |
| OLD | NEW |