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

Unified Diff: cc/test/begin_frame_args_test.cc

Issue 2686193002: [cc] facilitate use of BeginFrameAcks in tests. (Closed)
Patch Set: sync Created 3 years, 10 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 7ce80b57e5727840de665aca2b5271f5f09c3971..fdc28f1d297d1737d0b957db24af938a59668baa 100644
--- a/cc/test/begin_frame_args_test.cc
+++ b/cc/test/begin_frame_args_test.cc
@@ -93,4 +93,24 @@ void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) {
<< args.interval.InMicroseconds() << "us)";
}
+bool operator==(const BeginFrameAck& lhs, const BeginFrameAck& rhs) {
+ return (lhs.source_id == rhs.source_id) &&
+ (lhs.sequence_number == rhs.sequence_number) &&
+ (lhs.latest_confirmed_sequence_number ==
+ rhs.latest_confirmed_sequence_number) &&
+ (lhs.remaining_frames == rhs.remaining_frames) &&
+ (lhs.has_damage == rhs.has_damage);
+}
+
+::std::ostream& operator<<(::std::ostream& os, const BeginFrameAck& args) {
+ PrintTo(args, &os);
+ return os;
+}
+
+void PrintTo(const BeginFrameAck& ack, ::std::ostream* os) {
+ *os << "BeginFrameAck(" << ack.source_id << ", " << ack.sequence_number
+ << ", " << ack.latest_confirmed_sequence_number << ", "
+ << ack.remaining_frames << ", " << ack.has_damage << ")";
+}
+
} // 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