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

Unified Diff: chrome/test/chromedriver/extension/background.js

Issue 114403005: Adding a LaunchApp command to Chromedriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to latest code Created 6 years, 11 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/chromedriver/extension/background.js
diff --git a/chrome/test/chromedriver/extension/background.js b/chrome/test/chromedriver/extension/background.js
index 9158d6f5d72672bafc3bf7260cfe83d7771ebddb..e3d50d1dc6605a574d3137f52b9507ba8c441493 100644
--- a/chrome/test/chromedriver/extension/background.js
+++ b/chrome/test/chromedriver/extension/background.js
@@ -71,3 +71,18 @@ function updateWindow(updateInfo, callback, errCallback) {
});
});
}
+
+/**
+ * Launches an app with the specified id.
+ *
+ * @param {Object} Id The ID of the app to launch
chrisgao (Use stgao instead) 2014/01/07 23:36:36 string instead of an Object? nit: comment ends wit
bustamante 2014/01/13 21:19:29 Done.
+ * @param {function()} callback Invoked when the updating is complete.
chrisgao (Use stgao instead) 2014/01/07 23:36:36 It seems the comment is not correct.
bustamante 2014/01/13 21:19:29 Yeah copy/paste error, Done.
+ * @param {function(!Error)} errCallback The callback to invoke for error
+ * reporting.
+ */
+function launchApp(Id, callback, errCallback) {
+ chrome.management.launchApp(Id, function() {
+ checkForExtensionError(errCallback);
+ callback();
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698