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 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/prefs/public/pref_service_base.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "chrome/browser/api/prefs/pref_service_base.h" | |
15 #include "chrome/browser/policy/browser_policy_connector.h" | 15 #include "chrome/browser/policy/browser_policy_connector.h" |
16 #include "chrome/browser/policy/policy_map.h" | 16 #include "chrome/browser/policy/policy_map.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_tabstrip.h" | 19 #include "chrome/browser/ui/browser_tabstrip.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
23 #include "chrome/test/base/ui_test_utils.h" | 23 #include "chrome/test/base/ui_test_utils.h" |
24 #include "content/public/browser/notification_details.h" | 24 #include "content/public/browser/notification_details.h" |
25 #include "content/public/browser/notification_source.h" | 25 #include "content/public/browser/notification_source.h" |
26 #include "content/public/browser/render_view_host.h" | 26 #include "content/public/browser/render_view_host.h" |
27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
28 #include "content/public/test/browser_test_utils.h" | 28 #include "content/public/test/browser_test_utils.h" |
29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
30 #include "policy/policy_constants.h" | 30 #include "policy/policy_constants.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 | 32 |
33 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
| 34 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" |
| 35 #include "chrome/browser/chromeos/settings/cros_settings.h" |
34 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 36 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
35 #include "chrome/browser/chromeos/settings/cros_settings.h" | |
36 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" | |
37 #endif | 37 #endif |
38 | 38 |
39 using testing::AllOf; | 39 using testing::AllOf; |
40 using testing::Mock; | 40 using testing::Mock; |
41 using testing::Property; | 41 using testing::Property; |
42 using testing::Return; | 42 using testing::Return; |
43 | 43 |
44 namespace base { | 44 namespace base { |
45 | 45 |
46 // Helper for using EXPECT_EQ() with base::Value. | 46 // Helper for using EXPECT_EQ() with base::Value. |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 // Do not set the Boolean pref. It will toogle automatically. | 739 // Do not set the Boolean pref. It will toogle automatically. |
740 for (size_t i = 1; i < pref_names_.size(); ++i) | 740 for (size_t i = 1; i < pref_names_.size(); ++i) |
741 chromeos::proxy_cros_settings_parser::SetProxyPrefValue( | 741 chromeos::proxy_cros_settings_parser::SetProxyPrefValue( |
742 profile, pref_names_[i], non_default_values_[i]->DeepCopy()); | 742 profile, pref_names_[i], non_default_values_[i]->DeepCopy()); |
743 SetupJavaScriptTestEnvironment(pref_names_, &observed_json); | 743 SetupJavaScriptTestEnvironment(pref_names_, &observed_json); |
744 VerifyObservedPrefs(observed_json, pref_names_, non_default_values_, | 744 VerifyObservedPrefs(observed_json, pref_names_, non_default_values_, |
745 "", false, false); | 745 "", false, false); |
746 } | 746 } |
747 | 747 |
748 #endif | 748 #endif |
OLD | NEW |