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

Side by Side Diff: chrome/test/chromedriver/chrome/automation_extension.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/chromedriver/chrome/automation_extension.h" 5 #include "chrome/test/chromedriver/chrome/automation_extension.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/test/chromedriver/chrome/status.h" 9 #include "chrome/test/chromedriver/chrome/status.h"
10 #include "chrome/test/chromedriver/chrome/web_view.h" 10 #include "chrome/test/chromedriver/chrome/web_view.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const base::DictionaryValue& update_info) { 96 const base::DictionaryValue& update_info) {
97 base::ListValue args; 97 base::ListValue args;
98 args.Append(update_info.DeepCopy()); 98 args.Append(update_info.DeepCopy());
99 scoped_ptr<base::Value> result; 99 scoped_ptr<base::Value> result;
100 return web_view_->CallAsyncFunction(std::string(), 100 return web_view_->CallAsyncFunction(std::string(),
101 "updateWindow", 101 "updateWindow",
102 args, 102 args,
103 base::TimeDelta::FromSeconds(10), 103 base::TimeDelta::FromSeconds(10),
104 &result); 104 &result);
105 } 105 }
106
107 Status AutomationExtension::LaunchApp(std::string id) {
108 base::ListValue args;
109 args.AppendString(id);
110 scoped_ptr<base::Value> result;
111 return web_view_->CallAsyncFunction(std::string(),
112 "launchApp",
113 args,
114 base::TimeDelta::FromSeconds(10),
115 &result);
116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698