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

Side by Side Diff: chrome/browser/content_settings/content_settings_pref_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_pref_provider.h" 5 #include "chrome/browser/content_settings/content_settings_pref_provider.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DISALLOW_COPY_AND_ASSIGN(DeadlockCheckerObserver); 91 DISALLOW_COPY_AND_ASSIGN(DeadlockCheckerObserver);
92 }; 92 };
93 93
94 class PrefProviderTest : public testing::Test { 94 class PrefProviderTest : public testing::Test {
95 public: 95 public:
96 PrefProviderTest() : ui_thread_( 96 PrefProviderTest() : ui_thread_(
97 BrowserThread::UI, &message_loop_) { 97 BrowserThread::UI, &message_loop_) {
98 } 98 }
99 99
100 protected: 100 protected:
101 MessageLoop message_loop_; 101 base::MessageLoop message_loop_;
102 content::TestBrowserThread ui_thread_; 102 content::TestBrowserThread ui_thread_;
103 }; 103 };
104 104
105 TEST_F(PrefProviderTest, Observer) { 105 TEST_F(PrefProviderTest, Observer) {
106 TestingProfile profile; 106 TestingProfile profile;
107 PrefProvider pref_content_settings_provider(profile.GetPrefs(), false); 107 PrefProvider pref_content_settings_provider(profile.GetPrefs(), false);
108 108
109 ContentSettingsPattern pattern = 109 ContentSettingsPattern pattern =
110 ContentSettingsPattern::FromString("[*.]example.com"); 110 ContentSettingsPattern::FromString("[*.]example.com");
111 content_settings::MockObserver mock_observer; 111 content_settings::MockObserver mock_observer;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 DictionaryValue* mutable_settings = update.Get(); 435 DictionaryValue* mutable_settings = update.Get();
436 mutable_settings->SetWithoutPathExpansion("www.example.com,*", 436 mutable_settings->SetWithoutPathExpansion("www.example.com,*",
437 new base::DictionaryValue()); 437 new base::DictionaryValue());
438 } 438 }
439 EXPECT_TRUE(observer.notification_received()); 439 EXPECT_TRUE(observer.notification_received());
440 440
441 provider.ShutdownOnUIThread(); 441 provider.ShutdownOnUIThread();
442 } 442 }
443 443
444 } // namespace content_settings 444 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698