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

Unified Diff: content/browser/loader/navigation_url_loader_unittest.cc

Issue 1811913003: PlzNavigate: support NavigationThrottle::WillProcessResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of 1832803002 Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/navigation_url_loader_unittest.cc
diff --git a/content/browser/loader/navigation_url_loader_unittest.cc b/content/browser/loader/navigation_url_loader_unittest.cc
index 1e32323e0cff695f9aa367b88af2078b9595345b..bcd71a634e163f188159ce2f8526fef79d3fde6b 100644
--- a/content/browser/loader/navigation_url_loader_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_unittest.cc
@@ -224,6 +224,9 @@ TEST_F(NavigationURLLoaderTest, Basic) {
// Wait for the response to come back.
delegate.WaitForResponseStarted();
+ // Proceed with the response.
+ loader->ProceedWithResponse();
+
// Check the response is correct.
EXPECT_EQ("text/html", delegate.response()->head.mime_type);
EXPECT_EQ(200, delegate.response()->head.headers->response_code());
@@ -270,6 +273,9 @@ TEST_F(NavigationURLLoaderTest, RequestRedirected) {
loader->FollowRedirect();
delegate.WaitForResponseStarted();
+ // Proceed with the response.
+ loader->ProceedWithResponse();
+
// Check the response is correct.
EXPECT_EQ("text/html", delegate.response()->head.mime_type);
EXPECT_EQ(200, delegate.response()->head.headers->response_code());
@@ -371,6 +377,9 @@ TEST_F(NavigationURLLoaderTest, LoaderDetached) {
// Wait for the response to come back.
delegate.WaitForResponseStarted();
+ // Proceed with the response.
+ loader->ProceedWithResponse();
+
// Check the response is correct.
EXPECT_EQ("text/html", delegate.response()->head.mime_type);
EXPECT_EQ(200, delegate.response()->head.headers->response_code());
@@ -395,6 +404,9 @@ TEST_F(NavigationURLLoaderTest, OwnedByHandle) {
// Wait for the response to come back.
delegate.WaitForResponseStarted();
+ // Proceed with the response.
+ loader->ProceedWithResponse();
+
// Release the body.
delegate.ReleaseBody();
base::RunLoop().RunUntilIdle();
« no previous file with comments | « content/browser/loader/navigation_url_loader_impl_core.cc ('k') | content/test/test_navigation_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698