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

Unified Diff: chrome/test/chromedriver/session_commands.cc

Issue 114403005: Adding a LaunchApp command to Chromedriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing additional comments 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
« no previous file with comments | « chrome/test/chromedriver/session_commands.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/session_commands.cc
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index ab39e44b7972b806b9b95cda93bb60e085e5c9e4..390b7651fda6d5bba69907289a85d87561cc59b6 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -205,6 +205,27 @@ Status ExecuteGetCurrentWindowHandle(
return Status(kOk);
}
+Status ExecuteLaunchApp(
+ Session* session,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value) {
+ std::string id;
+ if (!params.GetString("id", &id))
+ return Status(kUnknownError, "'id' must be a string");
+
+ if (!session->chrome->GetAsDesktop())
+ return Status(kUnknownError,
+ "apps can only be launched on desktop platforms");
+
+ AutomationExtension* extension = NULL;
+ Status status =
+ session->chrome->GetAsDesktop()->GetAutomationExtension(&extension);
+ if (status.IsError())
+ return status;
+
+ return extension->LaunchApp(id);
+}
+
Status ExecuteClose(
Session* session,
const base::DictionaryValue& params,
« no previous file with comments | « chrome/test/chromedriver/session_commands.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698