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 "chrome/browser/content_settings/content_settings_policy_provider.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 "chrome/browser/content_settings/content_settings_mock_observer.h" | 12 #include "chrome/browser/content_settings/content_settings_mock_observer.h" |
13 #include "chrome/browser/content_settings/content_settings_rule.h" | 13 #include "chrome/browser/content_settings/content_settings_rule.h" |
14 #include "chrome/browser/content_settings/content_settings_utils.h" | 14 #include "chrome/browser/content_settings/content_settings_utils.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "chrome/test/base/testing_pref_service.h" | 19 #include "chrome/test/base/testing_pref_service.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "content/test/test_browser_thread.h" | 21 #include "content/test/test_browser_thread.h" |
22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 using ::testing::_; | 25 using ::testing::_; |
| 26 using content::BrowserThread; |
26 | 27 |
27 namespace content_settings { | 28 namespace content_settings { |
28 | 29 |
29 typedef std::vector<Rule> Rules; | 30 typedef std::vector<Rule> Rules; |
30 | 31 |
31 class PolicyProviderTest : public testing::Test { | 32 class PolicyProviderTest : public testing::Test { |
32 public: | 33 public: |
33 PolicyProviderTest() | 34 PolicyProviderTest() |
34 : ui_thread_(BrowserThread::UI, &message_loop_) { | 35 : ui_thread_(BrowserThread::UI, &message_loop_) { |
35 } | 36 } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType()); | 272 ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType()); |
272 DictionaryValue* dict_value = | 273 DictionaryValue* dict_value = |
273 static_cast<DictionaryValue*>(cert_filter.get()); | 274 static_cast<DictionaryValue*>(cert_filter.get()); |
274 std::string actual_common_name; | 275 std::string actual_common_name; |
275 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); | 276 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); |
276 EXPECT_EQ("issuer name", actual_common_name); | 277 EXPECT_EQ("issuer name", actual_common_name); |
277 provider.ShutdownOnUIThread(); | 278 provider.ShutdownOnUIThread(); |
278 } | 279 } |
279 | 280 |
280 } // namespace content_settings | 281 } // namespace content_settings |
OLD | NEW |