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

Unified Diff: ui/aura/window_unittest.cc

Issue 11359172: ui: Remove implicit flooring in skia rect conversion methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make root window transform in tests produce an integer result Created 8 years, 1 month 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/aura/root_window.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index b19d6a7a0cfa490281b856e21e7eba0cb1003844..14d61665d9a092bc77e4a28d4d25e463ffbd119e 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -421,12 +421,20 @@ TEST_F(WindowTest, MoveCursorToWithComplexTransform) {
CreateTestWindow(SK_ColorRED, 1111, gfx::Rect(5, 5, 50, 50), w111.get()));
RootWindow* root = root_window();
+
+ // The root window expects transforms that produce integer rects.
+ gfx::Transform root_transform;
+ root_transform.ConcatScale(2.0f, 3.0f);
+ root_transform.ConcatTranslate(-50, -50);
+ root_transform.ConcatRotate(-90.0f);
+ root_transform.ConcatTranslate(60, 70);
+
gfx::Transform transform;
transform.ConcatScale(0.3f, 0.5f);
transform.ConcatRotate(10.0f);
transform.ConcatTranslate(10, 20);
- root->SetTransform(transform);
+ root->SetTransform(root_transform);
w1->SetTransform(transform);
w11->SetTransform(transform);
w111->SetTransform(transform);
@@ -435,8 +443,8 @@ TEST_F(WindowTest, MoveCursorToWithComplexTransform) {
w1111->MoveCursorTo(gfx::Point(10, 10));
#if !defined(OS_WIN)
- // TODO(yoshiki): fix this to build on Windows. See crbug.com/133413.OD
- EXPECT_EQ("11,47", root->QueryMouseLocationForTest().ToString());
+ // TODO(yoshiki): fix this to build on Windows. See crbug.com/133413.
+ EXPECT_EQ("169,80", root->QueryMouseLocationForTest().ToString());
#endif
EXPECT_EQ("20,53",
gfx::Screen::GetScreenFor(root)->GetCursorScreenPoint().ToString());
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698