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

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

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/window_commands.cc
diff --git a/chrome/test/chromedriver/window_commands.cc b/chrome/test/chromedriver/window_commands.cc
index 266361b4c9555dfc49b4a62e1a71f66d7ab5568f..00885c6ddf6ad3a455862b705255d8d6e36f0f53 100644
--- a/chrome/test/chromedriver/window_commands.cc
+++ b/chrome/test/chromedriver/window_commands.cc
@@ -247,6 +247,22 @@ Status ExecuteGet(
return web_view->Load(url);
}
+Status ExecuteLaunchApp(
chrisgao (Use stgao instead) 2014/01/07 23:36:36 Is the app always opened in the current target win
bustamante 2014/01/13 21:19:29 Depending on the app type there's different behavi
chrisgao (Use stgao instead) 2014/01/15 21:39:56 Sorry, I might mislead you on this. After looking
bustamante 2014/01/15 23:51:38 Yeah that makes sense, if users won't mind switchi
+ Session* session,
+ WebView* web_view,
+ 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");
+
+ AutomationExtension* extension = NULL;
+ Status status =
+ session->chrome->GetAsDesktop()->GetAutomationExtension(&extension);
chrisgao (Use stgao instead) 2014/01/07 23:36:36 We may need to test whether we are on desktop or a
bustamante 2014/01/13 21:19:29 That's a great point, Done.
+
+ return extension->LaunchApp(id);
chrisgao (Use stgao instead) 2014/01/07 23:36:36 We may also need to check the returned status from
bustamante 2014/01/13 21:19:29 Done.
+}
+
Status ExecuteExecuteScript(
Session* session,
WebView* web_view,
« chrome/test/chromedriver/server/http_handler.cc ('K') | « chrome/test/chromedriver/window_commands.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698