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

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

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity Created 7 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/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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 EXPECT_EQ("onunloadCookie=foo", GetCookies(url)); 245 EXPECT_EQ("onunloadCookie=foo", GetCookies(url));
246 } 246 }
247 247
248 namespace { 248 namespace {
249 249
250 // Handles |request| by serving a redirect response. 250 // Handles |request| by serving a redirect response.
251 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler( 251 scoped_ptr<net::test_server::HttpResponse> NoContentResponseHandler(
252 const std::string& path, 252 const std::string& path,
253 const net::test_server::HttpRequest& request) { 253 const net::test_server::HttpRequest& request) {
254 if (!StartsWithASCII(path, request.relative_url, true)) 254 if (!StartsWithASCII(path, request.relative_url, true))
255 return scoped_ptr<net::test_server::HttpResponse>(NULL); 255 return scoped_ptr<net::test_server::HttpResponse>();
256 256
257 scoped_ptr<net::test_server::BasicHttpResponse> http_response( 257 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
258 new net::test_server::BasicHttpResponse); 258 new net::test_server::BasicHttpResponse);
259 http_response->set_code(net::test_server::NO_CONTENT); 259 http_response->set_code(net::test_server::NO_CONTENT);
260 return http_response.PassAs<net::test_server::HttpResponse>(); 260 return http_response.PassAs<net::test_server::HttpResponse>();
261 } 261 }
262 262
263 } // namespace 263 } // namespace
264 264
265 // Tests that the unload handler is not run for 204 responses. 265 // Tests that the unload handler is not run for 204 responses.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 CrossSiteFailedRequest) { 414 CrossSiteFailedRequest) {
415 // Visit another URL first to trigger a cross-site navigation. 415 // Visit another URL first to trigger a cross-site navigation.
416 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); 416 NavigateToURL(shell(), GetTestUrl("", "simple_page.html"));
417 417
418 // Visit a URL that fails without calling ResourceDispatcherHost::Read. 418 // Visit a URL that fails without calling ResourceDispatcherHost::Read.
419 GURL broken_url("chrome://theme"); 419 GURL broken_url("chrome://theme");
420 NavigateToURL(shell(), broken_url); 420 NavigateToURL(shell(), broken_url);
421 } 421 }
422 422
423 } // namespace content 423 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/drag_download_file_browsertest.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698