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" |
(...skipping 23 matching lines...) Expand all Loading... |
34 public: | 34 public: |
35 PolicyProviderTest() | 35 PolicyProviderTest() |
36 : ui_thread_(BrowserThread::UI, &message_loop_) { | 36 : ui_thread_(BrowserThread::UI, &message_loop_) { |
37 } | 37 } |
38 | 38 |
39 protected: | 39 protected: |
40 // TODO(markusheintz): Check if it's possible to derive the provider class | 40 // TODO(markusheintz): Check if it's possible to derive the provider class |
41 // from NonThreadSafe and to use native thread identifiers instead of | 41 // from NonThreadSafe and to use native thread identifiers instead of |
42 // BrowserThread IDs. Then we could get rid of the message_loop and ui_thread | 42 // BrowserThread IDs. Then we could get rid of the message_loop and ui_thread |
43 // fields. | 43 // fields. |
44 MessageLoop message_loop_; | 44 base::MessageLoop message_loop_; |
45 content::TestBrowserThread ui_thread_; | 45 content::TestBrowserThread ui_thread_; |
46 }; | 46 }; |
47 | 47 |
48 TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) { | 48 TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) { |
49 TestingProfile profile; | 49 TestingProfile profile; |
50 TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService(); | 50 TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService(); |
51 PolicyProvider provider(prefs); | 51 PolicyProvider provider(prefs); |
52 | 52 |
53 Rules rules; | 53 Rules rules; |
54 | 54 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType()); | 287 ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType()); |
288 DictionaryValue* dict_value = | 288 DictionaryValue* dict_value = |
289 static_cast<DictionaryValue*>(cert_filter.get()); | 289 static_cast<DictionaryValue*>(cert_filter.get()); |
290 std::string actual_common_name; | 290 std::string actual_common_name; |
291 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); | 291 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); |
292 EXPECT_EQ("issuer name", actual_common_name); | 292 EXPECT_EQ("issuer name", actual_common_name); |
293 provider.ShutdownOnUIThread(); | 293 provider.ShutdownOnUIThread(); |
294 } | 294 } |
295 | 295 |
296 } // namespace content_settings | 296 } // namespace content_settings |
OLD | NEW |