Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js

Issue 985533004: Implement chrome.fileSystem.requestFileSystem(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed kiosk mode. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js
diff --git a/chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js b/chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js
index 8d0d7da56ca7eeafa6d5c6634bb46fed4901b0a2..c91a4009ba1b2d97601ad5b8a5c791514d1d449e 100644
--- a/chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js
+++ b/chrome/test/data/extensions/api_test/file_browser/handler_test_runner/test.js
@@ -146,18 +146,23 @@ function run() {
* when all the test cases have been resolved, gets file tasks for each of
* them.
*
- * @param {FileEntry} entry The file entry for the test case.
+ * @param {FileEntry} isolatedEntry The file entry for the test case.
*/
- function onGotEntry(entry) {
- resolvedEntries.push(entry);
-
- if (resolvedEntries.length == kTestPaths.length) {
- resolvedEntries.forEach(function(entry) {
- chrome.fileManagerPrivate.getFileTasks(
- [entry.toURL()],
- onGotNonDefaultTasks.bind(null, entry.toURL()));
- });
- }
+ function onGotEntry(isolatedEntry) {
+ // TODO(mtomasz): Remove this hack after migrating chrome.fileManagerPrivate
+ // API to isolated context.
+ chrome.fileManagerPrivate.resolveIsolatedEntries(
+ [isolatedEntry],
+ function(externalEntries) {
+ resolvedEntries.push(externalEntries[0]);
+ if (resolvedEntries.length == kTestPaths.length) {
+ resolvedEntries.forEach(function(entry) {
+ chrome.fileManagerPrivate.getFileTasks(
+ [entry.toURL()],
+ onGotNonDefaultTasks.bind(null, entry.toURL()));
+ });
+ }
+ });
}
/**
@@ -190,8 +195,8 @@ function run() {
onError('No volumes available, which could be used for testing.');
return;
}
- chrome.fileManagerPrivate.requestFileSystem(
- sortedVolumeMetadataList[0].volumeId,
+ chrome.fileSystem.requestFileSystem(
+ {volumeId: sortedVolumeMetadataList[0].volumeId},
function(fileSystem) {
if (!fileSystem) {
onError('Failed to acquire the testing volume.');

Powered by Google App Engine
This is Rietveld 408576698