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

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

Issue 1658793002: Update chrome 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/prefs/pref_service.h"
7 #include "chrome/browser/content_settings/cookie_settings_factory.h" 6 #include "chrome/browser/content_settings/cookie_settings_factory.h"
8 #include "chrome/test/base/testing_profile.h" 7 #include "chrome/test/base/testing_profile.h"
9 #include "components/content_settings/core/browser/cookie_settings.h" 8 #include "components/content_settings/core/browser/cookie_settings.h"
10 #include "components/content_settings/core/common/content_settings_pattern.h" 9 #include "components/content_settings/core/common/content_settings_pattern.h"
10 #include "components/prefs/pref_service.h"
11 #include "content/public/test/test_browser_thread.h" 11 #include "content/public/test/test_browser_thread.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace { 15 namespace {
16 16
17 class CookieSettingsFactoryTest : public testing::Test { 17 class CookieSettingsFactoryTest : public testing::Test {
18 public: 18 public:
19 CookieSettingsFactoryTest() 19 CookieSettingsFactoryTest()
20 : ui_thread_(content::BrowserThread::UI, &message_loop_), 20 : ui_thread_(content::BrowserThread::UI, &message_loop_),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // incognito mode. 88 // incognito mode.
89 cookie_settings_->SetCookieSetting( 89 cookie_settings_->SetCookieSetting(
90 ContentSettingsPattern::FromURL(kHttpsSite), 90 ContentSettingsPattern::FromURL(kHttpsSite),
91 ContentSettingsPattern::Wildcard(), CONTENT_SETTING_ALLOW); 91 ContentSettingsPattern::Wildcard(), CONTENT_SETTING_ALLOW);
92 EXPECT_TRUE( 92 EXPECT_TRUE(
93 incognito_settings->IsReadingCookieAllowed(kHttpsSite, kHttpsSite)); 93 incognito_settings->IsReadingCookieAllowed(kHttpsSite, kHttpsSite));
94 EXPECT_TRUE(cookie_settings_->IsReadingCookieAllowed(kHttpsSite, kHttpsSite)); 94 EXPECT_TRUE(cookie_settings_->IsReadingCookieAllowed(kHttpsSite, kHttpsSite));
95 } 95 }
96 96
97 } // namespace 97 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698