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

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

Issue 21955003: Cleanup: Use content::kAboutBlankURL instead of the raw string in contents/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix build Created 7 years, 4 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/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "content/browser/download/download_manager_impl.h" 7 #include "content/browser/download/download_manager_impl.h"
8 #include "content/browser/web_contents/web_contents_impl.h" 8 #include "content/browser/web_contents/web_contents_impl.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // without network loads (e.g., about:blank, data URLs). 238 // without network loads (e.g., about:blank, data URLs).
239 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest, 239 IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
240 DISABLED_CrossSiteImmediateLoadOnunloadCookie) { 240 DISABLED_CrossSiteImmediateLoadOnunloadCookie) {
241 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 241 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
242 242
243 GURL url = embedded_test_server()->GetURL("/onunload_cookie.html"); 243 GURL url = embedded_test_server()->GetURL("/onunload_cookie.html");
244 CheckTitleTest(url, "set cookie on unload"); 244 CheckTitleTest(url, "set cookie on unload");
245 245
246 // Navigate to a cross-site page that loads immediately without making a 246 // Navigate to a cross-site page that loads immediately without making a
247 // network request. The unload event should still be run. 247 // network request. The unload event should still be run.
248 NavigateToURL(shell(), GURL("about:blank")); 248 NavigateToURL(shell(), GURL(kAboutBlankURL));
249 249
250 // Check that the cookie was set. 250 // Check that the cookie was set.
251 EXPECT_EQ("onunloadCookie=foo", GetCookies(url)); 251 EXPECT_EQ("onunloadCookie=foo", GetCookies(url));
252 } 252 }
253 253
254 namespace { 254 namespace {
255 255
256 // Handles |request| by serving a redirect response. 256 // Handles |request| by serving a redirect response.
257 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler( 257 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler(
258 const std::string& path, 258 const std::string& path,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 CrossSiteFailedRequest) { 420 CrossSiteFailedRequest) {
421 // Visit another URL first to trigger a cross-site navigation. 421 // Visit another URL first to trigger a cross-site navigation.
422 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); 422 NavigateToURL(shell(), GetTestUrl("", "simple_page.html"));
423 423
424 // Visit a URL that fails without calling ResourceDispatcherHost::Read. 424 // Visit a URL that fails without calling ResourceDispatcherHost::Read.
425 GURL broken_url("chrome://theme"); 425 GURL broken_url("chrome://theme");
426 NavigateToURL(shell(), broken_url); 426 NavigateToURL(shell(), broken_url);
427 } 427 }
428 428
429 } // namespace content 429 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/dump_accessibility_tree_browsertest.cc ('k') | content/browser/media/media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698