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

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

Issue 2743013002: Add webdriver endpoint to send custom debugger commands (Closed)
Patch Set: Adding e2e test Created 3 years, 8 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/chrome/web_view_impl.cc
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index 167151bce9c5095df9a9107226799f6c16960b71..fd5cd266efb9f2e9ee49c6aa602501e2aa892601 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -199,6 +199,23 @@ Status WebViewImpl::Load(const std::string& url, const Timeout* timeout) {
return client_->SendCommandWithTimeout("Page.navigate", params, timeout);
}
+Status WebViewImpl::SendCommandAndGetResult(
+ std::string* cmd,
+ const base::DictionaryValue& params,
+ std::unique_ptr<base::Value>* value) {
+ std::unique_ptr<base::DictionaryValue> result;
johnchen 2017/04/26 05:17:47 There should be no need to have a local variable t
em 2017/04/27 05:02:09 For some reason this doesn't seem to work, I get t
+ Status status = client_->SendCommandAndGetResult(*cmd, params, &result);
+ if (status.IsError())
+ return status;
+ value->reset(result->DeepCopy());
+ return Status(kOk);
+}
+
+Status WebViewImpl::SendCommand(std::string* cmd,
+ const base::DictionaryValue& params) {
+ return client_->SendCommand(*cmd, params);
+}
+
Status WebViewImpl::Reload(const Timeout* timeout) {
base::DictionaryValue params;
params.SetBoolean("ignoreCache", false);

Powered by Google App Engine
This is Rietveld 408576698