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

Unified Diff: chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.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_system_provider/test_util/test_util.js
diff --git a/chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.js b/chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.js
index 07f8a4fb370a65b75ef1669bae303cdbb87c4075..3db26a6b941111a51fec551f739884a851005183 100644
--- a/chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.js
+++ b/chrome/test/data/extensions/api_test/file_system_provider/test_util/test_util.js
@@ -102,8 +102,11 @@ test_util.mountFileSystem = function(callback, opt_options) {
test_util.getVolumeInfo(options.fileSystemId, function(volumeInfo) {
chrome.test.assertTrue(!!volumeInfo);
- chrome.fileManagerPrivate.requestFileSystem(
- volumeInfo.volumeId,
+ chrome.fileSystem.requestFileSystem(
+ {
+ volumeId: volumeInfo.volumeId,
+ writable: true
+ },
function(inFileSystem) {
chrome.test.assertTrue(!!inFileSystem);
test_util.fileSystem = inFileSystem;
@@ -252,3 +255,22 @@ test_util.onRemoveWatcherRequested = function(options, onSuccess, onError) {
onError('NOT_FOUND'); // enum ProviderError.
};
+
+/**
+ * Temporary method for converting an isolated entry to an external one.
+ * TODO(mtomasz): Remove after transition to isolated file systems is completed.
+ *
+ * @param {Entry} entry Isolated entry.
+ * @return {!Promise.<Entry>} Promise with an external entry, or null in case of
+ * on error.
+ */
+test_util.toExternalEntry = function(entry) {
+ return new Promise(
+ function(fulfill, reject) {
+ chrome.fileManagerPrivate.resolveIsolatedEntries(
+ [entry],
+ function(entries) {
+ fulfill(entries && entries.length ? entries[0] : null);
+ });
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698