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

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

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 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/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/browser/tab_contents/tab_contents.h"
15 #include "net/test/test_server.h" 16 #include "net/test/test_server.h"
16 17
17 // Regression test for http://crbug.com/63649. 18 // Regression test for http://crbug.com/63649.
18 IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, RedirectLoopCookies) { 19 IN_PROC_BROWSER_TEST_F(InProcessBrowserTest, RedirectLoopCookies) {
19 ASSERT_TRUE(test_server()->Start()); 20 ASSERT_TRUE(test_server()->Start());
20 21
21 GURL test_url = test_server()->GetURL("files/redirect-loop.html"); 22 GURL test_url = test_server()->GetURL("files/redirect-loop.html");
22 23
23 CookieSettings::GetForProfile(browser()->profile())-> 24 CookieSettings::GetForProfile(browser()->profile())->
24 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK); 25 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 CookieSettings::GetForProfile(browser()->profile())-> 65 CookieSettings::GetForProfile(browser()->profile())->
65 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK); 66 SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
66 67
67 ui_test_utils::NavigateToURL(browser(), test_url); 68 ui_test_utils::NavigateToURL(browser(), test_url);
68 69
69 TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper(); 70 TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
70 71
71 EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked( 72 EXPECT_TRUE(tab_contents->content_settings()->IsContentBlocked(
72 CONTENT_SETTINGS_TYPE_COOKIES)); 73 CONTENT_SETTINGS_TYPE_COOKIES));
73 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock_window_gtk.cc ('k') | chrome/browser/crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698