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

Unified Diff: media/cast/test/fake_single_thread_task_runner.h

Issue 289083002: Cast: Add tests for clocks being slow/fast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 7 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
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/fake_single_thread_task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/fake_single_thread_task_runner.h
diff --git a/media/cast/test/fake_single_thread_task_runner.h b/media/cast/test/fake_single_thread_task_runner.h
index 710138597f43015c777c39dedd0f09e72c726697..779a897cfbbad97ef4ac8f42cfa5af549d2af701 100644
--- a/media/cast/test/fake_single_thread_task_runner.h
+++ b/media/cast/test/fake_single_thread_task_runner.h
@@ -24,6 +24,9 @@ class FakeSingleThreadTaskRunner : public base::SingleThreadTaskRunner {
void RunTasks();
+ // Note: Advances |clock_|.
+ void Sleep(base::TimeDelta t);
+
// base::SingleThreadTaskRunner implementation.
virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
@@ -43,6 +46,7 @@ class FakeSingleThreadTaskRunner : public base::SingleThreadTaskRunner {
private:
base::SimpleTestTickClock* const clock_;
std::multimap<base::TimeTicks, PostedTask> tasks_;
+ bool fail_on_next_task_;
DISALLOW_COPY_AND_ASSIGN(FakeSingleThreadTaskRunner);
};
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/test/fake_single_thread_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698