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

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: added missing files 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
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..dce8dbf8337a0d3f76303daefac25e70c2609d02 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();
+ // Returns false if it had to iterate too long.
+ void Sleep(base::TimeDelta t);
Alpha Left Google 2014/05/15 22:21:24 This is a void method.
hubbe 2014/05/16 04:31:10 Done.
+
// 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);
};

Powered by Google App Engine
This is Rietveld 408576698