| OLD | NEW |
| 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/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/strings/string_util.h" | 6 #include "base/strings/string_util.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/browser/download/download_manager_impl.h" | 9 #include "content/browser/download/download_manager_impl.h" |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } // namespace | 456 } // namespace |
| 457 | 457 |
| 458 // Test that we update the cookie policy URLs correctly when transferring | 458 // Test that we update the cookie policy URLs correctly when transferring |
| 459 // navigations. | 459 // navigations. |
| 460 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, CookiePolicy) { | 460 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, CookiePolicy) { |
| 461 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 461 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 462 embedded_test_server()->RegisterRequestHandler( | 462 embedded_test_server()->RegisterRequestHandler( |
| 463 base::Bind(&HandleRedirectRequest, "/redirect?")); | 463 base::Bind(&HandleRedirectRequest, "/redirect?")); |
| 464 | 464 |
| 465 std::string set_cookie_url(base::StringPrintf( | 465 std::string set_cookie_url(base::StringPrintf( |
| 466 "http://localhost:%d/set_cookie.html", embedded_test_server()->port())); | 466 "http://localhost:%u/set_cookie.html", embedded_test_server()->port())); |
| 467 GURL url(embedded_test_server()->GetURL("/redirect?" + set_cookie_url)); | 467 GURL url(embedded_test_server()->GetURL("/redirect?" + set_cookie_url)); |
| 468 | 468 |
| 469 ShellContentBrowserClient::SetSwapProcessesForRedirect(true); | 469 ShellContentBrowserClient::SetSwapProcessesForRedirect(true); |
| 470 ShellNetworkDelegate::SetAcceptAllCookies(false); | 470 ShellNetworkDelegate::SetAcceptAllCookies(false); |
| 471 | 471 |
| 472 CheckTitleTest(url, "cookie set"); | 472 CheckTitleTest(url, "cookie set"); |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace content | 475 } // namespace content |
| OLD | NEW |