*/
BackgroundComponents.load = function() {
var stringDataPromise = new Promise(function(fulfill) {
- chrome.fileBrowserPrivate.getStrings(function(stringData) {
+ chrome.fileManagerPrivate.getStrings(function(stringData) {
loadTimeData.data = stringData;
fulfill(stringData);
});
*/
function resolveEntries(entries) {
return new Promise(function(fulfill, reject) {
- chrome.fileBrowserPrivate.resolveIsolatedEntries(entries,
- function(externalEntries) {
- if (!chrome.runtime.lastError)
- fulfill(externalEntries);
- else
- reject(chrome.runtime.lastError);
- });
+ chrome.fileManagerPrivate.resolveIsolatedEntries(
+ entries, function(externalEntries) {
+ if (!chrome.runtime.lastError)
+ fulfill(externalEntries);
+ else
+ reject(chrome.runtime.lastError);
+ });
});
}
// 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) {
+ /** @type {string} */
+ window.testExtensionId = 'ejhcmmdhhpdhhgmifplfmjobgegbibkn';
chrome.runtime.onMessageExternal.addListener(function(message) {
if (message.name !== 'testResourceLoaded')
return;
var script = document.createElement('script');
script.src =
- 'chrome-extension://ejhcmmdhhpdhhgmifplfmjobgegbibkn' +
- '/gallery/test_loader.js';
+ 'chrome-extension://' + window.testExtensionId +
+ '/common/test_loader.js';
document.documentElement.appendChild(script);
});
}