| 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,
|
|
|