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

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
« no previous file with comments | « chrome/test/automation/automation_json_requests.h ('k') | chrome/test/pyautolib/chrome_driver_factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e5419ce6bfa620adc2ecc10f47fb6b0cadc1f8ec..13aefc4aad9a2d88eb712452cc48968b3e47713d 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -806,3 +806,30 @@ bool SendUninstallExtensionJSONRequest(
}
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);
+}
« no previous file with comments | « chrome/test/automation/automation_json_requests.h ('k') | chrome/test/pyautolib/chrome_driver_factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698