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

Unified Diff: cc/test/begin_frame_args_test.cc

Issue 273823002: Adding gtest helpers for BeginFrameArgs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change EXPECT_EQ(true/false to EXPECT_TRUE/FALSE(. 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 | « cc/test/begin_frame_args_test.h ('k') | no next file » | 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 4565a949e8c49a1e1e93e32c5bc15d4e6ce17004..00952e2a91aba2c6f67fb3b3a403d06ce346ed32 100644
--- a/cc/test/begin_frame_args_test.cc
+++ b/cc/test/begin_frame_args_test.cc
@@ -32,4 +32,20 @@ BeginFrameArgs CreateExpiredBeginFrameArgsForTesting() {
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);
+}
+
+::std::ostream& operator<<(::std::ostream& os, const BeginFrameArgs& args) {
+ PrintTo(args, &os);
+ return os;
+}
+
+void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) {
+ *os << "BeginFrameArgs(" << args.frame_time.ToInternalValue() << ", "
+ << args.deadline.ToInternalValue() << ", "
+ << args.interval.InMicroseconds() << "us)";
+}
+
} // namespace cc
« no previous file with comments | « cc/test/begin_frame_args_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698