Chromium Code Reviews| 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 |