| 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 "components/content_settings/core/browser/content_settings_policy_provi
der.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" | |
| 14 #include "chrome/browser/content_settings/content_settings_mock_observer.h" | 13 #include "chrome/browser/content_settings/content_settings_mock_observer.h" |
| 15 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
| 18 #include "components/content_settings/core/browser/content_settings_rule.h" | 17 #include "components/content_settings/core/browser/content_settings_rule.h" |
| 19 #include "components/content_settings/core/browser/content_settings_utils.h" | 18 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 20 #include "components/content_settings/core/common/content_settings_pattern.h" | 19 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 21 #include "components/content_settings/core/common/pref_names.h" | 20 #include "components/content_settings/core/common/pref_names.h" |
| 22 #include "components/content_settings/core/test/content_settings_test_utils.h" | 21 #include "components/content_settings/core/test/content_settings_test_utils.h" |
| 22 #include "components/prefs/pref_service.h" |
| 23 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 23 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
| 24 #include "content/public/test/test_browser_thread_bundle.h" | 24 #include "content/public/test/test_browser_thread_bundle.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "url/gurl.h" | 26 #include "url/gurl.h" |
| 27 | 27 |
| 28 using ::testing::_; | 28 using ::testing::_; |
| 29 | 29 |
| 30 namespace content_settings { | 30 namespace content_settings { |
| 31 | 31 |
| 32 typedef std::vector<Rule> Rules; | 32 typedef std::vector<Rule> Rules; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType()); | 248 ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType()); |
| 249 base::DictionaryValue* dict_value = | 249 base::DictionaryValue* dict_value = |
| 250 static_cast<base::DictionaryValue*>(cert_filter.get()); | 250 static_cast<base::DictionaryValue*>(cert_filter.get()); |
| 251 std::string actual_common_name; | 251 std::string actual_common_name; |
| 252 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); | 252 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); |
| 253 EXPECT_EQ("issuer name", actual_common_name); | 253 EXPECT_EQ("issuer name", actual_common_name); |
| 254 provider.ShutdownOnUIThread(); | 254 provider.ShutdownOnUIThread(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace content_settings | 257 } // namespace content_settings |
| OLD | NEW |