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

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

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 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) 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 "components/content_settings/core/browser/content_settings_policy_provi der.h" 5 #include "components/content_settings/core/browser/content_settings_policy_provi der.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/test/scoped_feature_list.h" 14 #include "base/test/scoped_feature_list.h"
15 #include "chrome/browser/content_settings/content_settings_mock_observer.h" 15 #include "chrome/browser/content_settings/content_settings_mock_observer.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "components/content_settings/core/browser/content_settings_rule.h" 19 #include "components/content_settings/core/browser/content_settings_rule.h"
20 #include "components/content_settings/core/browser/content_settings_utils.h" 20 #include "components/content_settings/core/browser/content_settings_utils.h"
21 #include "components/content_settings/core/common/content_settings_pattern.h" 21 #include "components/content_settings/core/common/content_settings_pattern.h"
22 #include "components/content_settings/core/common/content_settings_utils.h"
22 #include "components/content_settings/core/common/pref_names.h" 23 #include "components/content_settings/core/common/pref_names.h"
23 #include "components/content_settings/core/test/content_settings_test_utils.h" 24 #include "components/content_settings/core/test/content_settings_test_utils.h"
24 #include "components/prefs/pref_service.h" 25 #include "components/prefs/pref_service.h"
25 #include "components/sync_preferences/testing_pref_service_syncable.h" 26 #include "components/sync_preferences/testing_pref_service_syncable.h"
26 #include "content/public/test/test_browser_thread_bundle.h" 27 #include "content/public/test/test_browser_thread_bundle.h"
27 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
28 #include "url/gurl.h" 29 #include "url/gurl.h"
29 30
30 using ::testing::_; 31 using ::testing::_;
31 32
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // The setting provided in the cookies pref is not valid for cookies. It 295 // The setting provided in the cookies pref is not valid for cookies. It
295 // should be ignored. 296 // should be ignored.
296 std::unique_ptr<RuleIterator> rule_iterator(provider.GetRuleIterator( 297 std::unique_ptr<RuleIterator> rule_iterator(provider.GetRuleIterator(
297 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), false)); 298 CONTENT_SETTINGS_TYPE_COOKIES, std::string(), false));
298 EXPECT_FALSE(rule_iterator); 299 EXPECT_FALSE(rule_iterator);
299 300
300 provider.ShutdownOnUIThread(); 301 provider.ShutdownOnUIThread();
301 } 302 }
302 303
303 } // namespace content_settings 304 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698