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

Side by Side Diff: chrome/browser/net/cookie_policy_browsertest.cc

Issue 525079: Add autodetection of "intranet" redirection, for ISPs etc. that send typos an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/browser.h" 5 #include "chrome/browser/browser.h"
6 #include "chrome/browser/net/url_request_context_getter.h" 6 #include "chrome/browser/net/url_request_context_getter.h"
7 #include "chrome/browser/profile.h" 7 #include "chrome/browser/profile.h"
8 #include "chrome/common/pref_names.h" 8 #include "chrome/common/pref_names.h"
9 #include "chrome/common/pref_service.h" 9 #include "chrome/common/pref_service.h"
10 #include "chrome/test/in_process_browser_test.h" 10 #include "chrome/test/in_process_browser_test.h"
11 #include "chrome/test/ui_test_utils.h" 11 #include "chrome/test/ui_test_utils.h"
12 #include "net/base/mock_host_resolver.h"
12 13
13 class CookiePolicyBrowserTest : public InProcessBrowserTest { 14 class CookiePolicyBrowserTest : public InProcessBrowserTest {
14 public: 15 public:
15 CookiePolicyBrowserTest() {} 16 CookiePolicyBrowserTest() {}
16 17
17 private: 18 private:
18 DISALLOW_COPY_AND_ASSIGN(CookiePolicyBrowserTest); 19 DISALLOW_COPY_AND_ASSIGN(CookiePolicyBrowserTest);
19 }; 20 };
20 21
21 // Visits a page that sets a first-party cookie. 22 // Visits a page that sets a first-party cookie.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ASSERT_EQ("", cookie); 79 ASSERT_EQ("", cookie);
79 80
80 host_resolver()->AddRule("www.example.com", "127.0.0.1"); 81 host_resolver()->AddRule("www.example.com", "127.0.0.1");
81 82
82 ui_test_utils::NavigateToURL(browser(), 83 ui_test_utils::NavigateToURL(browser(),
83 GURL(url.spec() + redirected_url.spec())); 84 GURL(url.spec() + redirected_url.spec()));
84 85
85 cookie = cookie_store->GetCookies(redirected_url); 86 cookie = cookie_store->GetCookies(redirected_url);
86 EXPECT_EQ("cookie2", cookie); 87 EXPECT_EQ("cookie2", cookie);
87 } 88 }
OLDNEW
« no previous file with comments | « chrome/browser/intranet_redirect_detector.cc ('k') | chrome/browser/privacy_blacklist/blacklist_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698