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

Unified Diff: views/view_unittest.cc

Issue 7066010: Fixes rounding bug in transform. This is needed to avoid rounding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« ui/gfx/transform.cc ('K') | « ui/gfx/transform.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 3d1218867fa8819e194f36ce89d3c8bd1d0881e8..5f86edd87dc77a124ccde4151dce07973c24fefc 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -1979,6 +1979,15 @@ TEST_F(ViewTest, ConvertPointToViewWithTransform) {
EXPECT_EQ(5, point.x());
EXPECT_EQ(5, point.y());
}
+
+ // Conversions from top_view to child with a value that should be negative.
+ // This ensures we don't round up with negative numbers.
+ {
+ gfx::Point point(6, 18);
+ View::ConvertPointToView(&top_view, child, &point);
+ EXPECT_EQ(-1, point.x());
+ EXPECT_EQ(-1, point.y());
+ }
}
TEST_F(ViewTest, Contains) {
« ui/gfx/transform.cc ('K') | « ui/gfx/transform.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698