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

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

Issue 101203012: [chromedriver] Add an error autoreporting feature that automatically raises errors from browser logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/session_commands.cc
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc
index a80aa46baeb0f6f3be972bdec16fc25b28bb8800..ea51ef8e884173152d58062b3a257e7ec7ac5a2a 100644
--- a/chrome/test/chromedriver/session_commands.cc
+++ b/chrome/test/chromedriver/session_commands.cc
@@ -607,3 +607,22 @@ Status ExecuteUploadFile(
value->reset(new base::StringValue(upload.value()));
return Status(kOk);
}
+
+Status ExecuteIsAutoReportingEnabled(
+ Session* session,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value) {
+ value->reset(new base::FundamentalValue(session->auto_reporting_enabled));
+ return Status(kOk);
+}
+
+Status ExecuteSetAutoReportingEnabled(
+ Session* session,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value) {
+ bool enable;
+ if (!params.GetBoolean("enable", &enable))
+ return Status(kUnknownError, "missing parameter 'enable'");
+ session->auto_reporting_enabled = enable;
+ return ExecuteIsAutoReportingEnabled(session, params, value);
chrisgao (Use stgao instead) 2014/01/09 22:11:55 Hmm, do we want to return the new value? It seems
samuong 2014/01/16 00:29:28 I thought it might be useful for clients but you'r
+}

Powered by Google App Engine
This is Rietveld 408576698