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

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: sky comes up with a one line fix 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
« no previous file with comments | « ui/views/controls/native/native_view_host_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
sky 2014/07/22 13:12:27 parent should be the native view here, right?
Evan Stade 2014/07/22 21:45:30 That won't demonstrate the bug. If I change params
sky 2014/07/22 21:52:33 Isn't the real bug that widget->GetNativeView() en
Evan Stade 2014/07/22 22:33:22 That only happened because of code in RootWindowCo
+ 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
« no previous file with comments | « ui/views/controls/native/native_view_host_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698