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

Unified Diff: ui/file_manager/file_manager/background/js/volume_manager_unittest.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: ui/file_manager/file_manager/background/js/volume_manager_unittest.js
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_unittest.js b/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
index e77a34e9d6237f68ae7620c9e2f2cbf36e5f0163..19946ee66b9e37ae3b0b067dd89946c20b7dd7f2 100644
--- a/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
+++ b/ui/file_manager/file_manager/background/js/volume_manager_unittest.js
@@ -12,6 +12,17 @@ loadTimeData.data = {
function setUp() {
// Set up mock of chrome.fileManagerPrivate APIs.
chrome = {
+ runtime: {
+ lastError: undefined
+ },
+ fileSystem: {
+ requestFileSystem: function(options, callback) {
+ if (!(options.volumeId in chrome.fileManagerPrivate.fileSystemMap_)) {
+ chrome.runtime.lastError = {message: 'Not found.'};
+ }
+ callback(chrome.fileManagerPrivate.fileSystemMap_[options.volumeId]);
+ },
+ },
fileManagerPrivate: {
mountSourcePath_: null,
onMountCompletedListeners_: [],
@@ -57,8 +68,9 @@ function setUp() {
getVolumeMetadataList: function(callback) {
callback(chrome.fileManagerPrivate.volumeMetadataList_);
},
- requestFileSystem: function(volumeId, callback) {
- callback(chrome.fileManagerPrivate.fileSystemMap_[volumeId]);
+ resolveIsolatedEntries: function(entries, callback) {
+ console.log('*** RESOLVE ISOLATED');
+ callback(entries);
},
set driveConnectionState(state) {
chrome.fileManagerPrivate.driveConnectionState_ = state;

Powered by Google App Engine
This is Rietveld 408576698