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

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

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/browser/frame_host/navigation_request_info.h" 10 #include "content/browser/frame_host/navigation_request_info.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return NavigationURLLoader::Create( 188 return NavigationURLLoader::Create(
189 browser_context_.get(), 0, request_info.Pass(), delegate); 189 browser_context_.get(), 0, request_info.Pass(), delegate);
190 } 190 }
191 191
192 // Helper function for fetching the body of a URL to a string. 192 // Helper function for fetching the body of a URL to a string.
193 std::string FetchURL(const GURL& url) { 193 std::string FetchURL(const GURL& url) {
194 net::TestDelegate delegate; 194 net::TestDelegate delegate;
195 net::URLRequestContext* request_context = 195 net::URLRequestContext* request_context =
196 browser_context_->GetResourceContext()->GetRequestContext(); 196 browser_context_->GetResourceContext()->GetRequestContext();
197 scoped_ptr<net::URLRequest> request(request_context->CreateRequest( 197 scoped_ptr<net::URLRequest> request(request_context->CreateRequest(
198 url, net::DEFAULT_PRIORITY, &delegate, nullptr)); 198 url, net::DEFAULT_PRIORITY, &delegate));
199 request->Start(); 199 request->Start();
200 base::RunLoop().Run(); 200 base::RunLoop().Run();
201 201
202 EXPECT_TRUE(request->status().is_success()); 202 EXPECT_TRUE(request->status().is_success());
203 EXPECT_EQ(200, request->response_headers()->response_code()); 203 EXPECT_EQ(200, request->response_headers()->response_code());
204 return delegate.data_received(); 204 return delegate.data_received();
205 } 205 }
206 206
207 protected: 207 protected:
208 TestBrowserThreadBundle thread_bundle_; 208 TestBrowserThreadBundle thread_bundle_;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 // Release the body. 394 // Release the body.
395 delegate.ReleaseBody(); 395 delegate.ReleaseBody();
396 base::RunLoop().RunUntilIdle(); 396 base::RunLoop().RunUntilIdle();
397 397
398 // Verify that URLRequestTestJob no longer has anything paused. 398 // Verify that URLRequestTestJob no longer has anything paused.
399 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage()); 399 EXPECT_FALSE(net::URLRequestTestJob::ProcessOnePendingMessage());
400 } 400 }
401 401
402 } // namespace content 402 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/buffered_resource_handler_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698