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

Unified Diff: ui/gfx/test/gfx_util.cc

Issue 2966723003: Add support for bounds animations (Closed)
Patch Set: address reviewer feedback Created 3 years, 5 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 | « ui/gfx/test/gfx_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/test/gfx_util.cc
diff --git a/ui/gfx/test/gfx_util.cc b/ui/gfx/test/gfx_util.cc
index e70b9609120ece666762ee4be4e68681e6d37f9d..e4a1ba87bad18c232a28107ffbfc678efc745273 100644
--- a/ui/gfx/test/gfx_util.cc
+++ b/ui/gfx/test/gfx_util.cc
@@ -120,6 +120,19 @@ bool FloatAlmostEqual(float a, float b) {
<< "\nWhich is: " << ColorAsString(lhs);
}
+::testing::AssertionResult AssertSizeFFloatEqual(const char* lhs_expr,
+ const char* rhs_expr,
+ const SizeF& lhs,
+ const SizeF& rhs) {
+ if (FloatAlmostEqual(lhs.width(), rhs.width()) &&
+ FloatAlmostEqual(lhs.height(), rhs.height())) {
+ return ::testing::AssertionSuccess();
+ }
+ return ::testing::AssertionFailure()
+ << "Value of: " << rhs_expr << "\n Actual: " << rhs.ToString()
+ << "\nExpected: " << lhs_expr << "\nWhich is: " << lhs.ToString();
+}
+
void PrintTo(const AxisTransform2d& transform, ::std::ostream* os) {
*os << transform.ToString();
}
« no previous file with comments | « ui/gfx/test/gfx_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698