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

Unified Diff: net/quic/test_tools/test_task_runner.cc

Issue 2789093003: Mark QUIC broken when the network blackholes after the handshake (Closed)
Patch Set: Created 3 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: net/quic/test_tools/test_task_runner.cc
diff --git a/net/quic/test_tools/test_task_runner.cc b/net/quic/test_tools/test_task_runner.cc
index 61d0700e1fa38fedec7849c04d6056bee690f28d..ad1a31826308472b6ec258233b9cab3c0c563cd8 100644
--- a/net/quic/test_tools/test_task_runner.cc
+++ b/net/quic/test_tools/test_task_runner.cc
@@ -35,8 +35,6 @@ const std::vector<PostedTask>& TestTaskRunner::GetPostedTasks() const {
}
void TestTaskRunner::RunNextTask() {
- // Find the next task to run, advance the time to the correct time
- // and then run the task.
std::vector<PostedTask>::iterator next = FindNextTask();
DCHECK(next != tasks_.end());
clock_->AdvanceTime(QuicTime::Delta::FromMicroseconds(
@@ -46,6 +44,10 @@ void TestTaskRunner::RunNextTask() {
std::move(task.task).Run();
}
+void TestTaskRunner::RunUntilIdle() {
+ while (!tasks_.empty())
+ RunNextTask();
+}
namespace {
struct ShouldRunBeforeLessThan {

Powered by Google App Engine
This is Rietveld 408576698