Commit ea25db6d authored by Tricia Crichton's avatar Tricia Crichton Committed by Commit Bot

[ChromeDriver] add timeout for HTTP Requests

During InitSession calls, add a timeout when ChromeDriver is requesting
initial connection details from Chrome. This will protect against
waiting indefinitely when Chrome is unresponsive.

Bug: chromedriver:2520
Change-Id: Ie160118a4b281e2651ab7f155a4cd36b740f1c7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2110813Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tricia Crichton <triciac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752041}
parent a8dedf13
......@@ -57,6 +57,7 @@ class SyncUrlFetcher {
loader_ = network::SimpleURLLoader::Create(std::move(request),
TRAFFIC_ANNOTATION_FOR_TESTS);
loader_->SetTimeoutDuration(base::TimeDelta::FromSeconds(10));
loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
url_loader_factory_, base::BindOnce(&SyncUrlFetcher::OnURLLoadComplete,
base::Unretained(this)));
......
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