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

Unified Diff: chrome/browser/ui/webui/options/preferences_browsertest.h

Issue 16045005: Migrate auto_tests about proxy configuration to browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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/browser/ui/webui/options/preferences_browsertest.h
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.h b/chrome/browser/ui/webui/options/preferences_browsertest.h
index 3d5fb218f8793fec814db5f9a96be1fa08608720..0d12f8d9b45d641ddeebe2a0af6b35d60a1388ec 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.h
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.h
@@ -45,6 +45,8 @@ class PreferencesBrowserTest : public InProcessBrowserTest {
protected:
MOCK_METHOD1(OnCommit, void(const PrefService::Preference*));
+ void SetUpPrefs();
+
// InProcessBrowserTest implementation:
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
virtual void TearDownInProcessBrowserTestFixture() OVERRIDE;
@@ -108,9 +110,20 @@ class PreferencesBrowserTest : public InProcessBrowserTest {
void SetupJavaScriptTestEnvironment(
const std::vector<std::string>& pref_names,
std::string* observed_json) const;
+
+ // Sets a value through the JavaScript Preferences class as if the user had
+ // modified it. Returns the observation which can be verified using the
+ // VerifyObserved* methods.
+ void SetPref(const std::string& name,
+ const std::string& type,
+ const base::Value* value,
+ bool commit,
+ std::string* observed_json);
+
// Verifies that setting a user-modified pref value through the JavaScript
- // Preferences class fires the correct notification in JavaScript and does
- // respectively does not cause the change to be committed to the C++ backend.
+ // Preferences class fires the correct notification in JavaScript and,
+ // depending on |commit|, does or does not commit the change to the C++
+ // backend.
Dan Beam 2013/05/28 22:45:27 // and commits the change to the C++ if |commit| i
pneubeck (no reviews) 2013/05/29 08:41:02 Done.
void VerifySetPref(const std::string& name,
const std::string& type,
const base::Value* value,

Powered by Google App Engine
This is Rietveld 408576698