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

Side by Side Diff: components/policy/core/browser/url_blacklist_manager_unittest.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 "components/policy/core/browser/url_blacklist_manager.h" 5 #include "components/policy/core/browser/url_blacklist_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <ostream> 8 #include <ostream>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/prefs/pref_registry_simple.h"
16 #include "base/prefs/testing_pref_service.h"
17 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
18 #include "components/policy/core/common/policy_pref_names.h" 16 #include "components/policy/core/common/policy_pref_names.h"
17 #include "components/prefs/pref_registry_simple.h"
18 #include "components/prefs/testing_pref_service.h"
19 #include "components/url_formatter/url_fixer.h" 19 #include "components/url_formatter/url_fixer.h"
20 #include "google_apis/gaia/gaia_urls.h" 20 #include "google_apis/gaia/gaia_urls.h"
21 #include "net/base/load_flags.h" 21 #include "net/base/load_flags.h"
22 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 namespace policy { 26 namespace policy {
27 27
28 namespace { 28 namespace {
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 blacklist.Allow(allowed.get()); 673 blacklist.Allow(allowed.get());
674 674
675 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://www.google.com"))); 675 EXPECT_TRUE(blacklist.IsURLBlocked(GURL("http://www.google.com")));
676 EXPECT_TRUE((blacklist.IsURLBlocked(GURL("chrome-extension://xyz")))); 676 EXPECT_TRUE((blacklist.IsURLBlocked(GURL("chrome-extension://xyz"))));
677 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-extension://abc")))); 677 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-extension://abc"))));
678 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-search://local-ntp")))); 678 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-search://local-ntp"))));
679 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-native://ntp")))); 679 EXPECT_FALSE((blacklist.IsURLBlocked(GURL("chrome-native://ntp"))));
680 } 680 }
681 681
682 } // namespace policy 682 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698