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

Side by Side Diff: chrome/test/webdriver/webdriver_automation.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_ 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 class AutomationProxy; 21 class AutomationProxy;
22 class ProxyLauncher; 22 class ProxyLauncher;
23 struct WebKeyEvent; 23 struct WebKeyEvent;
24 class WebViewId; 24 class WebViewId;
25 struct WebViewInfo; 25 struct WebViewInfo;
26 class WebViewLocator; 26 class WebViewLocator;
27 27
28 namespace base { 28 namespace base {
29 class DictionaryValue; 29 class DictionaryValue;
30 class ListValue; 30 class ListValue;
31 class Value;
31 } 32 }
32 33
33 namespace webdriver { 34 namespace webdriver {
34 35
35 class Error; 36 class Error;
36 class FramePath; 37 class FramePath;
37 class Point; 38 class Point;
38 39
39 // Creates and controls the Chrome instance. 40 // Creates and controls the Chrome instance.
40 // This class should be created and accessed on a single thread. 41 // This class should be created and accessed on a single thread.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 199
199 // Clicks the extension action button. If |browser_action| is false, the 200 // Clicks the extension action button. If |browser_action| is false, the
200 // page action will be clicked. 201 // page action will be clicked.
201 void ClickExtensionButton(const std::string& extension_id, 202 void ClickExtensionButton(const std::string& extension_id,
202 bool browser_action, 203 bool browser_action,
203 Error** error); 204 Error** error);
204 205
205 // Uninstalls the given extension. 206 // Uninstalls the given extension.
206 void UninstallExtension(const std::string& extension_id, Error** error); 207 void UninstallExtension(const std::string& extension_id, Error** error);
207 208
209 // Set a local state preference, which is not associated with any profile.
210 // Ownership of |value| is taken by this function.
211 void SetLocalStatePreference(const std::string& pref,
212 base::Value* value,
213 Error** error);
214
215 // Set a user preference, which is associated with the current profile.
216 // Ownership of |value| is taken by this fucntion.
217 void SetPreference(const std::string& pref,
218 base::Value* value,
219 Error** error);
208 220
209 private: 221 private:
210 AutomationProxy* automation() const; 222 AutomationProxy* automation() const;
211 Error* ConvertViewIdToLocator(const WebViewId& view_id, 223 Error* ConvertViewIdToLocator(const WebViewId& view_id,
212 WebViewLocator* view_locator); 224 WebViewLocator* view_locator);
213 Error* CompareVersion(int client_build_no, 225 Error* CompareVersion(int client_build_no,
214 int client_patch_no, 226 int client_patch_no,
215 bool* is_newer_or_equal); 227 bool* is_newer_or_equal);
216 Error* CheckVersion(int client_build_no, 228 Error* CheckVersion(int client_build_no,
217 int client_patch_no, 229 int client_patch_no,
218 const std::string& error_msg); 230 const std::string& error_msg);
219 Error* CheckAlertsSupported(); 231 Error* CheckAlertsSupported();
220 Error* CheckAdvancedInteractionsSupported(); 232 Error* CheckAdvancedInteractionsSupported();
221 Error* CheckNewExtensionInterfaceSupported(); 233 Error* CheckNewExtensionInterfaceSupported();
222 234
223 scoped_ptr<ProxyLauncher> launcher_; 235 scoped_ptr<ProxyLauncher> launcher_;
224 236
225 DISALLOW_COPY_AND_ASSIGN(Automation); 237 DISALLOW_COPY_AND_ASSIGN(Automation);
226 }; 238 };
227 239
228 } // namespace webdriver 240 } // namespace webdriver
229 241
230 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); 242 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation);
231 243
232 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_ 244 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_AUTOMATION_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/test/content_setting_test.html ('k') | chrome/test/webdriver/webdriver_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698