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

Side by Side Diff: chrome/browser/policy/url_blacklist_manager_unittest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/policy/url_blacklist_manager.h" 5 #include "chrome/browser/policy/url_blacklist_manager.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual void TearDown() OVERRIDE { 82 virtual void TearDown() OVERRIDE {
83 if (blacklist_manager_.get()) 83 if (blacklist_manager_.get())
84 blacklist_manager_->ShutdownOnUIThread(); 84 blacklist_manager_->ShutdownOnUIThread();
85 loop_.RunUntilIdle(); 85 loop_.RunUntilIdle();
86 // Delete |blacklist_manager_| while |io_thread_| is mapping IO to 86 // Delete |blacklist_manager_| while |io_thread_| is mapping IO to
87 // |loop_|. 87 // |loop_|.
88 blacklist_manager_.reset(); 88 blacklist_manager_.reset();
89 } 89 }
90 90
91 MessageLoop loop_; 91 MessageLoop loop_;
92 TestingPrefService pref_service_; 92 TestingPrefServiceSimple pref_service_;
93 scoped_ptr<TestingURLBlacklistManager> blacklist_manager_; 93 scoped_ptr<TestingURLBlacklistManager> blacklist_manager_;
94 94
95 private: 95 private:
96 content::TestBrowserThread ui_thread_; 96 content::TestBrowserThread ui_thread_;
97 content::TestBrowserThread file_thread_; 97 content::TestBrowserThread file_thread_;
98 content::TestBrowserThread io_thread_; 98 content::TestBrowserThread io_thread_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(URLBlacklistManagerTest); 100 DISALLOW_COPY_AND_ASSIGN(URLBlacklistManagerTest);
101 }; 101 };
102 102
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("http://s.plus.google.com"))); 434 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("http://s.plus.google.com")));
435 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://mail.google.com"))); 435 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://mail.google.com")));
436 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://mail.google.com"))); 436 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://mail.google.com")));
437 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://s.mail.google.com"))); 437 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://s.mail.google.com")));
438 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("https://very.safe/"))); 438 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("https://very.safe/")));
439 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://very.safe/path"))); 439 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://very.safe/path")));
440 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://very.safe/path"))); 440 EXPECT_FALSE(blacklist.IsURLBlocked(GURL("https://very.safe/path")));
441 } 441 }
442 442
443 } // namespace policy 443 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager.cc ('k') | chrome/browser/policy/user_cloud_policy_manager_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698