| 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
|
|
|