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

Unified Diff: chrome/test/data/extensions/api_test/filebrowser_component/main.js

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sync to head, comment Created 8 years, 4 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/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 101558bb6b2603041ab60b2d5d94a08715dbb3e2..81d07b77a4e9ef54f91b81994f6d4962d2de6d3e 100644
--- a/chrome/test/data/extensions/api_test/filebrowser_component/main.js
+++ b/chrome/test/data/extensions/api_test/filebrowser_component/main.js
@@ -64,6 +64,10 @@ TestExpectations.prototype.verifyHandlerRequest = function(request, callback) {
callback);
};
+TestExpectations.prototype.hasVerifyStep = function() {
+ return !!this.fileVerifierFunction_;
+};
+
// Verifies that list of tasks |tasks| contains tasks specified in
// expectedTasks_. |successCallback| expects to be passed |tasks|.
// |errorCallback| expects error object.
@@ -76,11 +80,11 @@ TestExpectations.prototype.verifyTasks = function(tasks,
}
for (var i = 0; i < tasks.length; ++i) {
- var taskName = /^.*[|](\w+)$/.exec(tasks[i].taskId)[1];
+ var taskName = /^.*[|](\S+)$/.exec(tasks[i].taskId)[1];
var patterns = tasks[i].patterns;
var expectedPatterns = this.expectedTasks_[taskName];
if (!expectedPatterns) {
- errorCallback({message: 'Wrong task from getFileTasks(): ' + task_name});
+ errorCallback({message: 'Wrong task from getFileTasks(): ' + taskName});
return;
}
patterns = patterns.sort();
@@ -132,7 +136,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) {
@@ -170,6 +173,11 @@ TestRunner.prototype.onGetTasks_ = function(fileUrl, tasks) {
TestRunner.prototype.onTasksVerified_ = function(fileUrl, tasks) {
chrome.fileBrowserPrivate.executeTask(tasks[0].taskId, [fileUrl]);
+
+ if (!this.expectations_.hasVerifyStep()) {
+ console.log('Not verifying content, succeed immediately.');
+ this.reportSuccess_();
+ }
};
TestRunner.prototype.errorCallback_ = function(error) {

Powered by Google App Engine
This is Rietveld 408576698