| Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| index 36665017959942e1c54fafe5935f6c485cf07446..5745dfd118bb973d4989823a5f9c1b5108cd120e 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| @@ -828,7 +828,7 @@ class RenderWidgetHostViewAuraOverscrollTest
|
| view_->overscroll_controller()->set_delegate(overscroll_delegate_.get());
|
|
|
| view_->InitAsChild(nullptr);
|
| - view_->SetBounds(gfx::Rect(0, 0, 400, 200));
|
| + view_->RequestTopLevelBoundsInScreen(gfx::Rect(0, 0, 400, 200));
|
| view_->Show();
|
|
|
| sink_->ClearMessages();
|
| @@ -1035,7 +1035,7 @@ TEST_F(RenderWidgetHostViewAuraTest, PositionChildPopup) {
|
| aura::Window* window = parent_view_->GetNativeView();
|
| aura::Window* root = window->GetRootWindow();
|
|
|
| - parent_view_->SetBounds(gfx::Rect(10, 10, 800, 600));
|
| + parent_view_->RequestTopLevelBoundsInScreen(gfx::Rect(10, 10, 800, 600));
|
| gfx::Rect bounds_in_screen = parent_view_->GetViewBounds();
|
| int horiz = bounds_in_screen.width() / 4;
|
| int vert = bounds_in_screen.height() / 4;
|
| @@ -1048,10 +1048,10 @@ TEST_F(RenderWidgetHostViewAuraTest, PositionChildPopup) {
|
| gfx::Rect final_bounds_in_screen = view_->GetViewBounds();
|
| EXPECT_EQ(final_bounds_in_screen.ToString(), bounds_in_screen.ToString());
|
|
|
| - // Verify that directly setting the bounds via SetBounds() treats the input
|
| - // as screen coordinates.
|
| + // Verify that directly setting the bounds via RequestTopLevelBoundsInScreen()
|
| + // treats the input as screen coordinates.
|
| bounds_in_screen = gfx::Rect(60, 60, 100, 100);
|
| - view_->SetBounds(bounds_in_screen);
|
| + view_->RequestTopLevelBoundsInScreen(bounds_in_screen);
|
| final_bounds_in_screen = view_->GetViewBounds();
|
| EXPECT_EQ(final_bounds_in_screen.ToString(), bounds_in_screen.ToString());
|
|
|
| @@ -1085,7 +1085,7 @@ TEST_F(RenderWidgetHostViewAuraTest, ParentMovementUpdatesScreenRect) {
|
| root->SetBounds(gfx::Rect(0, 0, 800, 600));
|
| parent1->SetBounds(gfx::Rect(1, 1, 300, 300));
|
| parent2->SetBounds(gfx::Rect(2, 2, 200, 200));
|
| - view_->SetBounds(gfx::Rect(3, 3, 100, 100));
|
| + view_->RequestTopLevelBoundsInScreen(gfx::Rect(3, 3, 100, 100));
|
| // view_ will be destroyed when parent is destroyed.
|
| view_ = nullptr;
|
|
|
| @@ -1152,7 +1152,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DestroyFullscreenOnBlur) {
|
| // view and focus does not change. This is the case when the user clicks on the
|
| // desktop background on Chrome OS.
|
| TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupClickOutsidePopup) {
|
| - parent_view_->SetBounds(gfx::Rect(10, 10, 400, 400));
|
| + parent_view_->RequestTopLevelBoundsInScreen(gfx::Rect(10, 10, 400, 400));
|
| parent_view_->Focus();
|
| EXPECT_TRUE(parent_view_->HasFocus());
|
|
|
| @@ -1179,7 +1179,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupClickOutsidePopup) {
|
| // view and focus does not change. This is the case when the user taps the
|
| // desktop background on Chrome OS.
|
| TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupTapOutsidePopup) {
|
| - parent_view_->SetBounds(gfx::Rect(10, 10, 400, 400));
|
| + parent_view_->RequestTopLevelBoundsInScreen(gfx::Rect(10, 10, 400, 400));
|
| parent_view_->Focus();
|
| EXPECT_TRUE(parent_view_->HasFocus());
|
|
|
| @@ -1208,7 +1208,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupTapOutsidePopup) {
|
| // when a select box is opened via a mouse press that it retains mouse capture
|
| // after the mouse is released.
|
| TEST_F(RenderWidgetHostViewAuraTest, PopupRetainsCaptureAfterMouseRelease) {
|
| - parent_view_->SetBounds(gfx::Rect(10, 10, 400, 400));
|
| + parent_view_->RequestTopLevelBoundsInScreen(gfx::Rect(10, 10, 400, 400));
|
| parent_view_->Focus();
|
| EXPECT_TRUE(parent_view_->HasFocus());
|
|
|
| @@ -1230,7 +1230,7 @@ TEST_F(RenderWidgetHostViewAuraTest, PopupRetainsCaptureAfterMouseRelease) {
|
| // Test that select boxes close when their parent window loses focus (e.g. due
|
| // to an alert or system modal dialog).
|
| TEST_F(RenderWidgetHostViewAuraTest, PopupClosesWhenParentLosesFocus) {
|
| - parent_view_->SetBounds(gfx::Rect(10, 10, 400, 400));
|
| + parent_view_->RequestTopLevelBoundsInScreen(gfx::Rect(10, 10, 400, 400));
|
| parent_view_->Focus();
|
| EXPECT_TRUE(parent_view_->HasFocus());
|
|
|
| @@ -1700,7 +1700,7 @@ TEST_F(RenderWidgetHostViewAuraTest, UpdateCursorIfOverSelf) {
|
| gfx::Rect());
|
|
|
| // Note that all coordinates in this test are screen coordinates.
|
| - view_->SetBounds(gfx::Rect(60, 60, 100, 100));
|
| + view_->RequestTopLevelBoundsInScreen(gfx::Rect(60, 60, 100, 100));
|
| view_->Show();
|
|
|
| aura::test::TestCursorClient cursor_client(
|
|
|