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

Unified Diff: ui/views/controls/native/native_view_host_aura_unittest.cc

Issue 397293005: Fix positioning of children of NativeViewHostAura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another test Created 6 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
Index: ui/views/controls/native/native_view_host_aura_unittest.cc
diff --git a/ui/views/controls/native/native_view_host_aura_unittest.cc b/ui/views/controls/native/native_view_host_aura_unittest.cc
index 22474d9fb634e4d99f91bc3f1fb2c2f452a09ad0..f605b97ec3b7a2c1aba261ace3083e87569ae224 100644
--- a/ui/views/controls/native/native_view_host_aura_unittest.cc
+++ b/ui/views/controls/native/native_view_host_aura_unittest.cc
@@ -325,4 +325,24 @@ TEST_F(NativeViewHostAuraTest, RemoveClippingWindowOrder) {
DestroyHost();
}
+// Regression test for crbug.com/391316
+TEST_F(NativeViewHostAuraTest, PositionPopupsInScreenCoordinates) {
+ CreateHost();
+ toplevel()->SetBounds(gfx::Rect(20, 20, 100, 100));
+ native_host()->ShowWidget(10, 20, 100, 100);
+ native_host()->InstallClip(35, 45, 50, 50);
+
+ Widget* popup = new views::Widget;
+ Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
+ params.parent = clipping_window();
+ popup->Init(params);
+ popup->Show();
+ popup->SetBounds(gfx::Rect(15, 15, 30, 30));
+
+ EXPECT_EQ(gfx::Rect(15, 15, 30, 30),
+ popup->GetRootView()->GetBoundsInScreen());
+
+ DestroyHost();
+}
+
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698