Commit 40000c63 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[fileapp] Fix undefined MockVolumeManager in files app SWA case

chrome_file_manager_private_test_impl.js is also being used to provide
file manager private fakes to the file manager SWA app. The SWA has no
MockVolumeManager, so move MockVolumeManager.resolveLocalFileSystemURL
code into the normal (non-swa) if block at the top.

Bug: 1113981
Change-Id: I2f7ba86fd8b28860e9319f6f3561b28d9d6fa8d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551860Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829555}
parent 66d95001
......@@ -42,6 +42,8 @@ if (window.test === undefined && window.isSWA) {
};
} else {
mockVolumeManager = new MockVolumeManager();
window.webkitResolveLocalFileSystemURL =
MockVolumeManager.resolveLocalFileSystemURL.bind(null, mockVolumeManager);
}
/**
......@@ -315,6 +317,3 @@ chrome.fileSystem = {
setTimeout(callback, 0, fs);
},
};
window.webkitResolveLocalFileSystemURL =
MockVolumeManager.resolveLocalFileSystemURL.bind(null, mockVolumeManager);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment