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

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

Issue 2283473002: Fixes for the failing URLLoaderFactoryImplTest content_unittests with PlzNavigate enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment and fix bot redness Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/test_url_loader_client.cc
diff --git a/content/browser/loader/test_url_loader_client.cc b/content/browser/loader/test_url_loader_client.cc
index 2f7234fa3762b7a71fad302d1933ed61ffe7f69e..035a050d28a1bc73d118524dea052668d1de001d 100644
--- a/content/browser/loader/test_url_loader_client.cc
+++ b/content/browser/loader/test_url_loader_client.cc
@@ -51,6 +51,8 @@ void TestURLLoaderClient::RunUntilResponseReceived() {
}
void TestURLLoaderClient::RunUntilResponseBodyArrived() {
+ if (response_body_.is_valid())
+ return;
base::RunLoop run_loop;
quit_closure_for_on_start_loading_response_body_ = run_loop.QuitClosure();
run_loop.Run();
@@ -58,6 +60,8 @@ void TestURLLoaderClient::RunUntilResponseBodyArrived() {
}
void TestURLLoaderClient::RunUntilComplete() {
+ if (has_received_completion_)
+ return;
base::RunLoop run_loop;
quit_closure_for_on_complete_ = run_loop.QuitClosure();
run_loop.Run();

Powered by Google App Engine
This is Rietveld 408576698