| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/wm/workspace/workspace_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 WorkspaceEventHandlerTest() {} | 25 WorkspaceEventHandlerTest() {} |
| 26 virtual ~WorkspaceEventHandlerTest() {} | 26 virtual ~WorkspaceEventHandlerTest() {} |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, | 29 aura::Window* CreateTestWindow(aura::WindowDelegate* delegate, |
| 30 const gfx::Rect& bounds) { | 30 const gfx::Rect& bounds) { |
| 31 aura::Window* window = new aura::Window(delegate); | 31 aura::Window* window = new aura::Window(delegate); |
| 32 window->SetType(aura::client::WINDOW_TYPE_NORMAL); | 32 window->SetType(aura::client::WINDOW_TYPE_NORMAL); |
| 33 window->Init(ui::LAYER_TEXTURED); | 33 window->Init(ui::LAYER_TEXTURED); |
| 34 window->SetParent(NULL); | 34 SetDefaultParentByPrimaryRootWindow(window); |
| 35 window->SetBounds(bounds); | 35 window->SetBounds(bounds); |
| 36 window->Show(); | 36 window->Show(); |
| 37 return window; | 37 return window; |
| 38 } | 38 } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTest); | 41 DISALLOW_COPY_AND_ASSIGN(WorkspaceEventHandlerTest); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { | 44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 wd.set_window_component(HTCAPTION); | 168 wd.set_window_component(HTCAPTION); |
| 169 | 169 |
| 170 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent())); | 170 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent())); |
| 171 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); | 171 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); |
| 172 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop( | 172 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop( |
| 173 window.release(), gfx::Vector2d()); | 173 window.release(), gfx::Vector2d()); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace internal | 176 } // namespace internal |
| 177 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |