Chromium Code Reviews| 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, |