| Index: chrome/test/data/extensions/api_test/filebrowser_component/main.js
|
| diff --git a/chrome/test/data/extensions/api_test/filebrowser_component/main.js b/chrome/test/data/extensions/api_test/filebrowser_component/main.js
|
| index 66505717695040373dc1d6ac2cfeb142e91f45f6..abbb8ad683498eb0900a80724689a628f6936208 100644
|
| --- a/chrome/test/data/extensions/api_test/filebrowser_component/main.js
|
| +++ b/chrome/test/data/extensions/api_test/filebrowser_component/main.js
|
| @@ -18,8 +18,8 @@ var kFileManagerExtensionId = 'hhaomjibdihmijegdhdafkllkbggdgoj';
|
| // Class specified by the client running the TestRunner.
|
| // |expectedTasks| should contain list of actions defined for abc files defined
|
| // by filesystem_handler part of the test.
|
| -// |fileVerifierFunction| method that will verify test results received from the
|
| -// filesystem_handler part of the test.
|
| +// |fileVerifierFunction| optional method that will verify test results received
|
| +// from the filesystem_handler part of the test.
|
| // The method will be passed received fileEntry object, original file
|
| // content, response received from filesystem_handler and callback
|
| // function that will expect error object as its argument (or undefined on
|
| @@ -71,14 +71,18 @@ TestExpectations.prototype.verifyHandlerRequest = function(request, callback) {
|
| var TestRunner = function(expectations) {
|
| this.expectations_ = expectations;
|
| this.fileCreator_ = new TestFileCreator("tmp", true /* shouldRandomize */);
|
| - this.listener_ = this.onHandlerRequest_.bind(this);
|
| + if (expectations.fileVerifierFunction_) {
|
| + this.listener_ = this.onHandlerRequest_.bind(this);
|
| + }
|
| };
|
|
|
| // Starts the test.
|
| TestRunner.prototype.runTest = function() {
|
| // Get local FS, create dir with a file in it.
|
| console.log('Requesting local file system...');
|
| - chrome.extension.onRequestExternal.addListener(this.listener_);
|
| + if (this.listener_) {
|
| + chrome.extension.onRequestExternal.addListener(this.listener_);
|
| + }
|
| chrome.fileBrowserPrivate.requestLocalFileSystem(
|
| this.onFileSystemFetched_.bind(this));
|
| };
|
| @@ -99,7 +103,6 @@ TestRunner.prototype.onFileCreatorInit_ = function() {
|
| this.errorCallback_({message: "Test file extension not set."});
|
| return;
|
| }
|
| - console.log(this.fileExtension);
|
| var self = this;
|
| this.fileCreator_.createFile('.log',
|
| function(file, text) {
|
| @@ -130,7 +133,6 @@ TestRunner.prototype.onGetTasks_ = function(fileUrl, tasks) {
|
|
|
| console.log('DONE fetching ' + tasks.length + ' tasks');
|
|
|
| - tasks = this.filterTasks_(tasks);
|
| chrome.fileBrowserPrivate.executeTask(tasks[0].taskId, [fileUrl]);
|
| };
|
|
|
|
|