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

Unified Diff: chrome/test/automation/automation_json_requests.cc

Issue 8890026: Allow chromedriver to set local state preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years 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/automation/automation_json_requests.cc
diff --git a/chrome/test/automation/automation_json_requests.cc b/chrome/test/automation/automation_json_requests.cc
index fc5d8f0c2f769b56d30d0472205f7a750f7eeb20..3058bace67f8df5ff88788cc44470598f77760b7 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -650,3 +650,30 @@ bool SendInstallExtensionJSONRequest(
}
return true;
}
+
+bool SendSetLocalStatePreferenceJSONRequest(
+ AutomationMessageSender* sender,
+ const std::string& pref,
+ base::Value* value,
+ std::string* error_msg) {
+ DictionaryValue dict;
+ dict.SetString("command", "SetLocalStatePrefs");
+ dict.SetString("path", pref);
+ dict.Set("value", value);
+ DictionaryValue reply_dict;
+ return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg);
+}
+
+bool SendSetPreferenceJSONRequest(
+ AutomationMessageSender* sender,
+ const std::string& pref,
+ base::Value* value,
+ std::string* error_msg) {
+ DictionaryValue dict;
+ dict.SetString("command", "SetPrefs");
+ dict.SetInteger("windex", 0);
+ dict.SetString("path", pref);
+ dict.Set("value", value);
+ DictionaryValue reply_dict;
+ return SendAutomationJSONRequest(sender, dict, &reply_dict, error_msg);
+}

Powered by Google App Engine
This is Rietveld 408576698