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

Unified Diff: ui/aura/window_unittest.cc

Issue 173443002: aura: Take transformation into account when computing window bounds in root-window/screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
« ui/aura/window.cc ('K') | « ui/aura/window_targeter_unittest.cc ('k') | no next file » | 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 e3e81b2d04cb93cac5eedea53c701b705c0b2222..e849330e32aeb782f1f1943dc1d016beade88139 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -1125,6 +1125,14 @@ TEST_F(WindowTest, GetBoundsInRootWindow) {
// |GetBoundsInRootWindow()| should return 0,0.
child->SetBounds(gfx::Rect(100, 100, 100, 100));
EXPECT_EQ("0,0 100x100", child->GetBoundsInRootWindow().ToString());
+
+ gfx::Transform transform;
+ transform.Scale(0.5, 0.5);
+ viewport->SetTransform(transform);
+ EXPECT_EQ(gfx::Rect(-100, -100, 150, 150).ToString(),
+ viewport->GetBoundsInRootWindow().ToString());
+ EXPECT_EQ(gfx::Rect(-50, -50, 50, 50).ToString(),
+ child->GetBoundsInRootWindow().ToString());
}
class MouseEnterExitWindowDelegate : public TestWindowDelegate {
« ui/aura/window.cc ('K') | « ui/aura/window_targeter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698