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

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

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. Created 9 years, 1 month 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) 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 "base/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 8 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/content_settings_pattern.h" 11 #include "chrome/common/content_settings_pattern.h"
11 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
12 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
13 #include "content/test/test_browser_thread.h" 14 #include "content/test/test_browser_thread.h"
14 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
15 #include "net/base/static_cookie_policy.h" 16 #include "net/base/static_cookie_policy.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 CookieSettings* cookie_settings = CookieSettings::GetForProfile(&profile); 254 CookieSettings* cookie_settings = CookieSettings::GetForProfile(&profile);
254 profile.GetPrefs()->SetBoolean(prefs::kBlockThirdPartyCookies, true); 255 profile.GetPrefs()->SetBoolean(prefs::kBlockThirdPartyCookies, true);
255 256
256 // XHRs stemming from extensions are exempt from third-party cookie blocking 257 // XHRs stemming from extensions are exempt from third-party cookie blocking
257 // rules (as the first party is always the extension's security origin). 258 // rules (as the first party is always the extension's security origin).
258 EXPECT_TRUE(cookie_settings->IsSettingCookieAllowed( 259 EXPECT_TRUE(cookie_settings->IsSettingCookieAllowed(
259 kBlockedSite, kExtensionURL)); 260 kBlockedSite, kExtensionURL));
260 } 261 }
261 262
262 } // namespace 263 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698