Commit 80548e8a authored by Alex Clarke's avatar Alex Clarke Committed by Commit Bot

Fix WebURLLoaderMockFactoryImpl::RunUntilIdle

This can lead to nested messageloops and it's working by accident
currently due to the interactions with the way the SequenceManager and
the MessageLoop work.

Bug: 863341, 891670
Change-Id: I7b01059638e2ba8a136a7daac387467aab517a3c
Reviewed-on: https://chromium-review.googlesource.com/c/1347353Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610394}
parent 937314d2
...@@ -168,10 +168,11 @@ void WebURLLoaderMockFactoryImpl::LoadAsynchronouly( ...@@ -168,10 +168,11 @@ void WebURLLoaderMockFactoryImpl::LoadAsynchronouly(
} }
void WebURLLoaderMockFactoryImpl::RunUntilIdle() { void WebURLLoaderMockFactoryImpl::RunUntilIdle() {
if (platform_) if (platform_) {
platform_->RunUntilIdle(); platform_->RunUntilIdle();
else } else {
base::RunLoop().RunUntilIdle(); base::RunLoop(base::RunLoop::Type::kNestableTasksAllowed).RunUntilIdle();
}
} }
void WebURLLoaderMockFactoryImpl::LoadRequest( void WebURLLoaderMockFactoryImpl::LoadRequest(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment