| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const std::vector<base::Value*>& values, | 54 const std::vector<base::Value*>& values, |
| 55 policy::PolicyLevel level); | 55 policy::PolicyLevel level); |
| 56 // Clears user policies. | 56 // Clears user policies. |
| 57 void ClearUserPolicies(); | 57 void ClearUserPolicies(); |
| 58 // Set user-modified pref values directly in the C++ backend. | 58 // Set user-modified pref values directly in the C++ backend. |
| 59 void SetUserValues(const std::vector<std::string>& names, | 59 void SetUserValues(const std::vector<std::string>& names, |
| 60 const std::vector<base::Value*>& values); | 60 const std::vector<base::Value*>& values); |
| 61 | 61 |
| 62 // Verifies that a dictionary contains a (key, value) pair. Takes ownership of | 62 // Verifies that a dictionary contains a (key, value) pair. Takes ownership of |
| 63 // |expected|. | 63 // |expected|. |
| 64 void VerifyKeyValue(const base::DictionaryValue* dict, | 64 void VerifyKeyValue(const base::DictionaryValue& dict, |
| 65 const std::string& key, | 65 const std::string& key, |
| 66 base::Value* expected); | 66 const base::Value& expected); |
| 67 // Verifies that a dictionary contains a given pref and that its value has | 67 // Verifies that a dictionary contains a given pref and that its value has |
| 68 // been decorated correctly. | 68 // been decorated correctly. |
| 69 void VerifyPref(const base::DictionaryValue* prefs, | 69 void VerifyPref(const base::DictionaryValue* prefs, |
| 70 const std::string& name, | 70 const std::string& name, |
| 71 const base::Value* value, | 71 const base::Value* value, |
| 72 const std::string& controlledBy, | 72 const std::string& controlledBy, |
| 73 bool disabled, | 73 bool disabled, |
| 74 bool uncommitted); | 74 bool uncommitted); |
| 75 // Verifies that a notification received from the JavaScript Preferences | 75 // Verifies that a notification received from the JavaScript Preferences |
| 76 // class contains a given pref and that its value has been decorated | 76 // class contains a given pref and that its value has been decorated |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 std::vector<std::string> pref_names_; | 175 std::vector<std::string> pref_names_; |
| 176 std::vector<std::string> policy_names_; | 176 std::vector<std::string> policy_names_; |
| 177 std::vector<base::Value*> default_values_; | 177 std::vector<base::Value*> default_values_; |
| 178 std::vector<base::Value*> non_default_values_; | 178 std::vector<base::Value*> non_default_values_; |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 DISALLOW_COPY_AND_ASSIGN(PreferencesBrowserTest); | 181 DISALLOW_COPY_AND_ASSIGN(PreferencesBrowserTest); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ | 184 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_PREFERENCES_BROWSERTEST_H_ |
| OLD | NEW |