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

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

Issue 325443002: Move about://-related constants from //content to //url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android ifx Created 6 years, 6 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) 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/strings/string_util.h" 5 #include "base/strings/string_util.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/download/download_manager_impl.h" 8 #include "content/browser/download/download_manager_impl.h"
9 #include "content/browser/web_contents/web_contents_impl.h" 9 #include "content/browser/web_contents/web_contents_impl.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // without network loads (e.g., about:blank, data URLs). 241 // without network loads (e.g., about:blank, data URLs).
242 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, 242 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
243 DISABLED_CrossSiteImmediateLoadOnunloadCookie) { 243 DISABLED_CrossSiteImmediateLoadOnunloadCookie) {
244 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 244 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
245 245
246 GURL url = embedded_test_server()->GetURL("/onunload_cookie.html"); 246 GURL url = embedded_test_server()->GetURL("/onunload_cookie.html");
247 CheckTitleTest(url, "set cookie on unload"); 247 CheckTitleTest(url, "set cookie on unload");
248 248
249 // Navigate to a cross-site page that loads immediately without making a 249 // Navigate to a cross-site page that loads immediately without making a
250 // network request. The unload event should still be run. 250 // network request. The unload event should still be run.
251 NavigateToURL(shell(), GURL(kAboutBlankURL)); 251 NavigateToURL(shell(), GURL(url::kAboutBlankURL));
252 252
253 // Check that the cookie was set. 253 // Check that the cookie was set.
254 EXPECT_EQ("onunloadCookie=foo", GetCookies(url)); 254 EXPECT_EQ("onunloadCookie=foo", GetCookies(url));
255 } 255 }
256 256
257 namespace { 257 namespace {
258 258
259 // Handles |request| by serving a redirect response. 259 // Handles |request| by serving a redirect response.
260 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler( 260 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler(
261 const std::string& path, 261 const std::string& path,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 "http://localhost:%d/set_cookie.html", embedded_test_server()->port())); 461 "http://localhost:%d/set_cookie.html", embedded_test_server()->port()));
462 GURL url(embedded_test_server()->GetURL("/redirect?" + set_cookie_url)); 462 GURL url(embedded_test_server()->GetURL("/redirect?" + set_cookie_url));
463 463
464 ShellContentBrowserClient::SetSwapProcessesForRedirect(true); 464 ShellContentBrowserClient::SetSwapProcessesForRedirect(true);
465 ShellNetworkDelegate::SetAcceptAllCookies(false); 465 ShellNetworkDelegate::SetAcceptAllCookies(false);
466 466
467 CheckTitleTest(url, "cookie set"); 467 CheckTitleTest(url, "cookie set");
468 } 468 }
469 469
470 } // namespace content 470 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/media/media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698