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

Unified Diff: cc/test/begin_frame_args_test.cc

Issue 387493002: Fixing and enhancing OrderedSimpleTaskRunner to allow 100% deterministic tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for Brian's comments. Created 6 years, 3 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 | « cc/test/begin_frame_args_test.h ('k') | cc/test/ordered_simple_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/begin_frame_args_test.cc
diff --git a/cc/test/begin_frame_args_test.cc b/cc/test/begin_frame_args_test.cc
index 83051b23a49f4cedf3223ef9630079a1f48cab5f..137d5e12863be408a80f8eac25949be31ae36d72 100644
--- a/cc/test/begin_frame_args_test.cc
+++ b/cc/test/begin_frame_args_test.cc
@@ -36,6 +36,22 @@ BeginFrameArgs CreateExpiredBeginFrameArgsForTesting() {
BeginFrameArgs::DefaultInterval());
}
+BeginFrameArgs CreateBeginFrameArgsForTesting(
+ scoped_refptr<TestNowSource> now_src) {
+ base::TimeTicks now = now_src->Now();
+ return BeginFrameArgs::Create(now,
+ now + (BeginFrameArgs::DefaultInterval() / 2),
+ BeginFrameArgs::DefaultInterval());
+}
+
+BeginFrameArgs CreateExpiredBeginFrameArgsForTesting(
+ scoped_refptr<TestNowSource> now_src) {
+ base::TimeTicks now = now_src->Now();
+ return BeginFrameArgs::Create(now,
+ now - BeginFrameArgs::DefaultInterval(),
+ BeginFrameArgs::DefaultInterval());
+}
+
bool operator==(const BeginFrameArgs& lhs, const BeginFrameArgs& rhs) {
return (lhs.frame_time == rhs.frame_time) && (lhs.deadline == rhs.deadline) &&
(lhs.interval == rhs.interval);
« no previous file with comments | « cc/test/begin_frame_args_test.h ('k') | cc/test/ordered_simple_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698