| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // Tests verifying that the JavaScript Preferences class, the underlying C++ | 33 // Tests verifying that the JavaScript Preferences class, the underlying C++ |
| 34 // CoreOptionsHandler and the specialized classes handling Chrome OS device and | 34 // CoreOptionsHandler and the specialized classes handling Chrome OS device and |
| 35 // proxy prefs behave correctly. | 35 // proxy prefs behave correctly. |
| 36 class PreferencesBrowserTest : public InProcessBrowserTest { | 36 class PreferencesBrowserTest : public InProcessBrowserTest { |
| 37 public: | 37 public: |
| 38 PreferencesBrowserTest(); | 38 PreferencesBrowserTest(); |
| 39 ~PreferencesBrowserTest(); | 39 ~PreferencesBrowserTest(); |
| 40 | 40 |
| 41 // InProcessBrowserTest implementation: | 41 // InProcessBrowserTest implementation: |
| 42 virtual void SetUpOnMainThread() OVERRIDE; | 42 virtual void SetUpOnMainThread() override; |
| 43 | 43 |
| 44 void OnPreferenceChanged(const std::string& pref_name); | 44 void OnPreferenceChanged(const std::string& pref_name); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 MOCK_METHOD1(OnCommit, void(const PrefService::Preference*)); | 47 MOCK_METHOD1(OnCommit, void(const PrefService::Preference*)); |
| 48 | 48 |
| 49 void SetUpPrefs(); | 49 void SetUpPrefs(); |
| 50 | 50 |
| 51 // InProcessBrowserTest implementation: | 51 // InProcessBrowserTest implementation: |
| 52 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 52 virtual void SetUpInProcessBrowserTestFixture() override; |
| 53 | 53 |
| 54 // Sets user policies through the mock policy provider. | 54 // Sets user policies through the mock policy provider. |
| 55 void SetUserPolicies(const std::vector<std::string>& names, | 55 void SetUserPolicies(const std::vector<std::string>& names, |
| 56 const std::vector<base::Value*>& values, | 56 const std::vector<base::Value*>& values, |
| 57 policy::PolicyLevel level); | 57 policy::PolicyLevel level); |
| 58 // Clears user policies. | 58 // Clears user policies. |
| 59 void ClearUserPolicies(); | 59 void ClearUserPolicies(); |
| 60 // Set user-modified pref values directly in the C++ backend. | 60 // Set user-modified pref values directly in the C++ backend. |
| 61 void SetUserValues(const std::vector<std::string>& names, | 61 void SetUserValues(const std::vector<std::string>& names, |
| 62 const std::vector<base::Value*>& values); | 62 const std::vector<base::Value*>& values); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 std::vector<std::string> pref_names_; | 187 std::vector<std::string> pref_names_; |
| 188 std::vector<std::string> policy_names_; | 188 std::vector<std::string> policy_names_; |
| 189 ScopedVector<base::Value> default_values_; | 189 ScopedVector<base::Value> default_values_; |
| 190 ScopedVector<base::Value> non_default_values_; | 190 ScopedVector<base::Value> non_default_values_; |
| 191 | 191 |
| 192 private: | 192 private: |
| 193 DISALLOW_COPY_AND_ASSIGN(PreferencesBrowserTest); | 193 DISALLOW_COPY_AND_ASSIGN(PreferencesBrowserTest); |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ | 196 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ |
| OLD | NEW |