OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/content_settings/content_settings_policy_provider.h" | 5 #include "components/content_settings/core/browser/content_settings_policy_provi
der.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "chrome/browser/content_settings/content_settings_mock_observer.h" | 14 #include "chrome/browser/content_settings/content_settings_mock_observer.h" |
15 #include "chrome/browser/content_settings/content_settings_utils.h" | |
16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 17 #include "chrome/common/url_constants.h" |
19 #include "chrome/test/base/testing_pref_service_syncable.h" | 18 #include "chrome/test/base/testing_pref_service_syncable.h" |
20 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
21 #include "components/content_settings/core/browser/content_settings_rule.h" | 20 #include "components/content_settings/core/browser/content_settings_rule.h" |
| 21 #include "components/content_settings/core/browser/content_settings_utils.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 using ::testing::_; | 25 using ::testing::_; |
26 | 26 |
27 namespace content_settings { | 27 namespace content_settings { |
28 | 28 |
29 typedef std::vector<Rule> Rules; | 29 typedef std::vector<Rule> Rules; |
30 | 30 |
31 TEST(PolicyProviderTest, DefaultGeolocationContentSetting) { | 31 TEST(PolicyProviderTest, DefaultGeolocationContentSetting) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType()); | 270 ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType()); |
271 base::DictionaryValue* dict_value = | 271 base::DictionaryValue* dict_value = |
272 static_cast<base::DictionaryValue*>(cert_filter.get()); | 272 static_cast<base::DictionaryValue*>(cert_filter.get()); |
273 std::string actual_common_name; | 273 std::string actual_common_name; |
274 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); | 274 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); |
275 EXPECT_EQ("issuer name", actual_common_name); | 275 EXPECT_EQ("issuer name", actual_common_name); |
276 provider.ShutdownOnUIThread(); | 276 provider.ShutdownOnUIThread(); |
277 } | 277 } |
278 | 278 |
279 } // namespace content_settings | 279 } // namespace content_settings |
OLD | NEW |