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, |