| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/constrained_window/constrained_window_views.h" | 5 #include "components/constrained_window/constrained_window_views.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ptr_util.h" |
| 11 #include "components/constrained_window/constrained_window_views_client.h" | 12 #include "components/constrained_window/constrained_window_views_client.h" |
| 12 #include "components/web_modal/test_web_contents_modal_dialog_host.h" | 13 #include "components/web_modal/test_web_contents_modal_dialog_host.h" |
| 13 #include "ui/display/display.h" | 14 #include "ui/display/display.h" |
| 14 #include "ui/display/screen.h" | 15 #include "ui/display/screen.h" |
| 15 #include "ui/gfx/geometry/point.h" | 16 #include "ui/gfx/geometry/point.h" |
| 16 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 17 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 19 #include "ui/views/border.h" | 20 #include "ui/views/border.h" |
| 20 #include "ui/views/test/views_test_base.h" | 21 #include "ui/views/test/views_test_base.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // Now reposition the modal dialog into the display. | 260 // Now reposition the modal dialog into the display. |
| 260 UpdateWebContentsModalDialogPosition(dialog(), dialog_host()); | 261 UpdateWebContentsModalDialogPosition(dialog(), dialog_host()); |
| 261 | 262 |
| 262 const gfx::Rect dialog_bounds = dialog()->GetRootView()->GetBoundsInScreen(); | 263 const gfx::Rect dialog_bounds = dialog()->GetRootView()->GetBoundsInScreen(); |
| 263 | 264 |
| 264 // The dialog should now be fully on the display. | 265 // The dialog should now be fully on the display. |
| 265 EXPECT_TRUE(extents.Contains(dialog_bounds)); | 266 EXPECT_TRUE(extents.Contains(dialog_bounds)); |
| 266 } | 267 } |
| 267 | 268 |
| 268 } // namespace constrained_window | 269 } // namespace constrained_window |
| OLD | NEW |