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

Unified Diff: chrome/test/data/extensions/api_test/file_browser/file_watcher_test/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/file_watcher_test/test.js
diff --git a/chrome/test/data/extensions/api_test/file_browser/file_watcher_test/test.js b/chrome/test/data/extensions/api_test/file_browser/file_watcher_test/test.js
index 6c392eded12aae1a3bfe97ca90495a6dcf0f1472..55d16f996424fe71983358ebe68015c679919228 100644
--- a/chrome/test/data/extensions/api_test/file_browser/file_watcher_test/test.js
+++ b/chrome/test/data/extensions/api_test/file_browser/file_watcher_test/test.js
@@ -245,8 +245,8 @@ function initTests(callback) {
return;
}
- chrome.fileManagerPrivate.requestFileSystem(
- sortedVolumeMetadataList[0].volumeId,
+ chrome.fileSystem.requestFileSystem(
+ {volumeId: sortedVolumeMetadataList[0].volumeId, writable: true},
function(fileSystem) {
if (!fileSystem) {
callback(testParams, 'Failed to acquire the testing volume.');
@@ -287,7 +287,19 @@ function initTests(callback) {
getFunction = fileSystem.root.getDirectory.bind(fileSystem.root);
}
- getFunction(testEntry.path, {},
+ // TODO(mtomasz): Remove this hack after migrating watchers to
+ // chrome.fileSystem.
+ var getFunctionAndConvert = function(path, options, callback) {
+ getFunction(path, options, function(isolatedEntry) {
+ chrome.fileManagerPrivate.resolveIsolatedEntries(
+ [isolatedEntry],
+ function(externalEntries) {
+ callback(externalEntries[0]);
+ });
+ });
+ };
+
+ getFunctionAndConvert(testEntry.path, {},
function(entry) {
testParams.entries[testEntry.name] = entry;
getNextEntry();

Powered by Google App Engine
This is Rietveld 408576698