// found in the LICENSE file.
/**
- * Test component extension that tests fileBrowserPrivate file watch api.
+ * Test component extension that tests fileManagerPrivate file watch api.
* The extension adds file watch on set of entries and performs set of file
* system operations that should trigger onDirectoryChanged events for the
* watched entries. On file system operations is performed per a test function.
this.expectedEvents_ = {};
/**
- * List of fileBrowserPrivate.onDirectoryChanged events received before file
+ * List of fileManagerPrivate.onDirectoryChanged events received before file
* system operation was done.
*
* @type {Array.<Object>}
this.receivedEntry_ = null;
/**
- * The listener to the fileBrowserPrivate.onDirectoryChanged.
+ * The listener to the fileManagerPrivate.onDirectoryChanged.
*
* @type {function(Object)}
* @private
* Starts listening for the onDirectoryChanged events.
*/
start: function() {
- chrome.fileBrowserPrivate.onDirectoryChanged.addListener(
+ chrome.fileManagerPrivate.onDirectoryChanged.addListener(
this.eventListener_);
},
return;
this.done_ = true;
- chrome.fileBrowserPrivate.onDirectoryChanged.removeListener(
+ chrome.fileManagerPrivate.onDirectoryChanged.removeListener(
this.eventListener_);
chrome.test.fail(message);
},
return;
this.done_ = true;
- chrome.fileBrowserPrivate.onDirectoryChanged.removeListener(
+ chrome.fileManagerPrivate.onDirectoryChanged.removeListener(
this.eventListener_);
chrome.test.succeed();
},
* it adds the event to |eventQueue_|. The events from |eventQueue_| will be
* verified once the file system operation is done.
*
- * @param {Object} event chrome.fileBrowserPrivate.onDirectoryChanged event.
+ * @param {Object} event chrome.fileManagerPrivate.onDirectoryChanged event.
* @private
*/
onDirectoryChanged_: function(event) {
* It verifies that the recived event matches the expected event parameters.
* If the received event was the last expected event, onSuccess_ is called.
*
- * @param {Object} event chrome.fileBrowserPrivate.onDirectoryChanged event.
+ * @param {Object} event chrome.fileManagerPrivate.onDirectoryChanged event.
* @private
*/
verifyReceivedEvent_: function(event) {
fileSystem: null
};
- chrome.fileBrowserPrivate.getVolumeMetadataList(function(volumeMetadataList) {
+ chrome.fileManagerPrivate.getVolumeMetadataList(function(volumeMetadataList) {
var possibleVolumeTypes = ['testing', 'drive'];
var sortedVolumeMetadataList = volumeMetadataList.filter(function(volume) {
return;
}
- chrome.fileBrowserPrivate.requestFileSystem(
+ chrome.fileManagerPrivate.requestFileSystem(
sortedVolumeMetadataList[0].volumeId,
function(fileSystem) {
if (!fileSystem) {
chrome.test.runTests([
function addFileWatch() {
- chrome.fileBrowserPrivate.addFileWatch(
+ chrome.fileManagerPrivate.addFileWatch(
testParams.entries.file.toURL(),
chrome.test.callbackPass(function(success) {
chrome.test.assertTrue(success);
},
function addSubdirWatch() {
- chrome.fileBrowserPrivate.addFileWatch(
+ chrome.fileManagerPrivate.addFileWatch(
testParams.entries.subdir.toURL(),
chrome.test.callbackPass(function(success) {
chrome.test.assertTrue(success);
},
function addDirWatch() {
- chrome.fileBrowserPrivate.addFileWatch(
+ chrome.fileManagerPrivate.addFileWatch(
testParams.entries.dir.toURL(),
chrome.test.callbackPass(function(success) {
chrome.test.assertTrue(success);
},
function removeFileWatch() {
- chrome.fileBrowserPrivate.removeFileWatch(
+ chrome.fileManagerPrivate.removeFileWatch(
testParams.entries.file.toURL(),
chrome.test.callbackPass(function(success) {
chrome.test.assertTrue(success);
},
function removeDirWatch() {
- chrome.fileBrowserPrivate.removeFileWatch(
+ chrome.fileManagerPrivate.removeFileWatch(
testParams.entries.dir.toURL(),
chrome.test.callbackPass(function(success) {
chrome.test.assertTrue(success);