Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(940)

Side by Side Diff: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698