| 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_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 namespace ash { | 40 namespace ash { |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 WorkspaceLayoutManager* GetWorkspaceLayoutManager(WmWindow* container) { | 43 WorkspaceLayoutManager* GetWorkspaceLayoutManager(WmWindow* container) { |
| 44 return static_cast<WorkspaceLayoutManager*>(container->GetLayoutManager()); | 44 return static_cast<WorkspaceLayoutManager*>(container->GetLayoutManager()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace | 47 } // namespace |
| 48 | 48 |
| 49 // TODO: this is a duplicate of that in ash/common, and should move once | |
| 50 // keyboard is refactored to work in mash. | |
| 51 class WorkspaceLayoutManagerKeyboardTest : public AshTest { | 49 class WorkspaceLayoutManagerKeyboardTest : public AshTest { |
| 52 public: | 50 public: |
| 53 WorkspaceLayoutManagerKeyboardTest() : layout_manager_(nullptr) {} | 51 WorkspaceLayoutManagerKeyboardTest() : layout_manager_(nullptr) {} |
| 54 ~WorkspaceLayoutManagerKeyboardTest() override {} | 52 ~WorkspaceLayoutManagerKeyboardTest() override {} |
| 55 | 53 |
| 56 void SetUp() override { | 54 void SetUp() override { |
| 57 AshTest::SetUp(); | 55 AshTest::SetUp(); |
| 58 UpdateDisplay("800x600"); | 56 UpdateDisplay("800x600"); |
| 59 WmWindow* default_container = | 57 WmWindow* default_container = |
| 60 WmShell::Get()->GetPrimaryRootWindowController()->GetWmContainer( | 58 WmShell::Get()->GetPrimaryRootWindowController()->GetWmContainer( |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 changed_window_bounds.Offset(0, -shift); | 194 changed_window_bounds.Offset(0, -shift); |
| 197 // Window should be shifted up. | 195 // Window should be shifted up. |
| 198 EXPECT_EQ(changed_window_bounds, window->GetBounds()); | 196 EXPECT_EQ(changed_window_bounds, window->GetBounds()); |
| 199 | 197 |
| 200 kb_controller->HideKeyboard( | 198 kb_controller->HideKeyboard( |
| 201 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); | 199 keyboard::KeyboardController::HIDE_REASON_AUTOMATIC); |
| 202 EXPECT_EQ(orig_window_bounds, window->GetBounds()); | 200 EXPECT_EQ(orig_window_bounds, window->GetBounds()); |
| 203 } | 201 } |
| 204 | 202 |
| 205 } // namespace ash | 203 } // namespace ash |
| OLD | NEW |