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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
9 #include "ash/accessibility_types.h" | 9 #include "ash/accessibility_types.h" |
10 #include "ash/drag_drop/drag_drop_controller.h" | 10 #include "ash/drag_drop/drag_drop_controller.h" |
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), | 1845 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), |
1846 bounds.bottom() - transformed_rect.bottom(), 1); | 1846 bounds.bottom() - transformed_rect.bottom(), 1); |
1847 } | 1847 } |
1848 | 1848 |
1849 // Start dragging a window and activate overview mode. This test should not | 1849 // Start dragging a window and activate overview mode. This test should not |
1850 // crash or DCHECK inside aura::Window::StackChildRelativeTo(). | 1850 // crash or DCHECK inside aura::Window::StackChildRelativeTo(). |
1851 TEST_F(WindowSelectorTest, OverviewWhileDragging) { | 1851 TEST_F(WindowSelectorTest, OverviewWhileDragging) { |
1852 const gfx::Rect bounds(10, 10, 100, 100); | 1852 const gfx::Rect bounds(10, 10, 100, 100); |
1853 std::unique_ptr<aura::Window> window(CreateWindow(bounds)); | 1853 std::unique_ptr<aura::Window> window(CreateWindow(bounds)); |
1854 std::unique_ptr<WindowResizer> resizer( | 1854 std::unique_ptr<WindowResizer> resizer( |
1855 CreateWindowResizer(WmWindow::Get(window.get()), gfx::Point(), HTCAPTION, | 1855 CreateWindowResizer(window.get(), gfx::Point(), HTCAPTION, |
1856 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 1856 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
1857 ASSERT_TRUE(resizer.get()); | 1857 ASSERT_TRUE(resizer.get()); |
1858 gfx::Point location = resizer->GetInitialLocation(); | 1858 gfx::Point location = resizer->GetInitialLocation(); |
1859 location.Offset(20, 20); | 1859 location.Offset(20, 20); |
1860 resizer->Drag(location, 0); | 1860 resizer->Drag(location, 0); |
1861 ToggleOverview(); | 1861 ToggleOverview(); |
1862 resizer->RevertDrag(); | 1862 resizer->RevertDrag(); |
1863 } | 1863 } |
1864 | 1864 |
1865 } // namespace ash | 1865 } // namespace ash |
OLD | NEW |