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

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

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Updated test Created 5 years, 8 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response, 109 void OnResponseStarted(const scoped_refptr<ResourceResponse>& response,
110 scoped_ptr<StreamHandle> body) override { 110 scoped_ptr<StreamHandle> body) override {
111 response_ = response; 111 response_ = response;
112 body_ = body.Pass(); 112 body_ = body.Pass();
113 ASSERT_TRUE(response_started_); 113 ASSERT_TRUE(response_started_);
114 response_started_->Quit(); 114 response_started_->Quit();
115 } 115 }
116 116
117 void OnRequestFailed(int net_error) override { 117 void OnRequestFailed(bool in_cache, int net_error) override {
118 net_error_ = net_error; 118 net_error_ = net_error;
119 ASSERT_TRUE(request_failed_); 119 ASSERT_TRUE(request_failed_);
120 request_failed_->Quit(); 120 request_failed_->Quit();
121 } 121 }
122 122
123 void OnRequestStarted(base::TimeTicks timestamp) override { 123 void OnRequestStarted(base::TimeTicks timestamp) override {
124 ASSERT_FALSE(timestamp.is_null()); 124 ASSERT_FALSE(timestamp.is_null());
125 ++on_request_handled_counter_; 125 ++on_request_handled_counter_;
126 } 126 }
127 127
(...skipping 265 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/navigation_url_loader_impl_core.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