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

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: Addressed comments. 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..f8445d42effc98098a28c2851b4f859968e1c069 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,19 @@ 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 commits
+ // the change to C++ if |commit| is true.
void VerifySetPref(const std::string& name,
const std::string& type,
const base::Value* value,

Powered by Google App Engine
This is Rietveld 408576698