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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_browsertest.cc

Issue 717373002: Use uint16 for port numbers, content/ edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 6 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
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/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
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
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/tethering_handler.cc ('k') | content/browser/renderer_host/p2p/socket_host_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698