| Index: chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js b/chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js
|
| index d78a38113dfa6b359f6201edb5d3560fb780d805..11e6446278986fcda46ecd0c2ffd93ba7b532e47 100644
|
| --- a/chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js
|
| +++ b/chrome/test/data/extensions/api_test/file_browser/multi_profile_copy/test.js
|
| @@ -126,28 +126,37 @@ function initTests(callback) {
|
| return;
|
| }
|
|
|
| - chrome.fileManagerPrivate.requestFileSystem(
|
| - driveVolumes[0].volumeId,
|
| + chrome.fileSystem.requestFileSystem(
|
| + {
|
| + volumeId: driveVolumes[0].volumeId,
|
| + writable: true
|
| + },
|
| function(primaryFileSystem) {
|
| if (!primaryFileSystem) {
|
| callback(null, 'Failed to acquire the testing volume.');
|
| return;
|
| }
|
|
|
| - var url = primaryFileSystem.root.toURL().replace(
|
| - /[^\/]*\/?$/, kSecondaryDriveMountPointName);
|
| + // Resolving the isolated entry is necessary in order to fetch URL
|
| + // of an entry from a different profile.
|
| + chrome.fileManagerPrivate.resolveIsolatedEntries(
|
| + [primaryFileSystem.root],
|
| + function(entries) {
|
| + var url = entries[0].toURL().replace(
|
| + /[^\/]*\/?$/, kSecondaryDriveMountPointName);
|
| + chrome.fileManagerPrivate.grantAccess([url], function() {
|
| + webkitResolveLocalFileSystemURL(url, function(entry) {
|
| + if (!entry) {
|
| + callback(
|
| + null,
|
| + 'Failed to acquire secondary profile\'s volume.');
|
| + return;
|
| + }
|
|
|
| - chrome.fileManagerPrivate.grantAccess([url], function() {
|
| - webkitResolveLocalFileSystemURL(url, function(entry) {
|
| - if (!entry) {
|
| - callback(
|
| - null, 'Failed to acquire secondary profile\'s volume.');
|
| - return;
|
| - }
|
| -
|
| - callback(collectTests(primaryFileSystem.root, entry), 'Success.');
|
| - });
|
| - });
|
| + callback(collectTests(entries[0], entry), 'Success.');
|
| + });
|
| + });
|
| + });
|
| });
|
| });
|
| }
|
|
|