| 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 "ash/wm/workspace_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 class WorkspaceControllerTest : public test::AshTestBase { | 82 class WorkspaceControllerTest : public test::AshTestBase { |
| 83 public: | 83 public: |
| 84 WorkspaceControllerTest() {} | 84 WorkspaceControllerTest() {} |
| 85 ~WorkspaceControllerTest() override {} | 85 ~WorkspaceControllerTest() override {} |
| 86 | 86 |
| 87 aura::Window* CreateTestWindowUnparented() { | 87 aura::Window* CreateTestWindowUnparented() { |
| 88 aura::Window* window = new aura::Window(NULL); | 88 aura::Window* window = new aura::Window(NULL); |
| 89 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 89 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 90 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 90 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 91 window->Init(aura::WINDOW_LAYER_TEXTURED); | 91 window->Init(ui::LAYER_TEXTURED); |
| 92 return window; | 92 return window; |
| 93 } | 93 } |
| 94 | 94 |
| 95 aura::Window* CreateTestWindow() { | 95 aura::Window* CreateTestWindow() { |
| 96 aura::Window* window = new aura::Window(NULL); | 96 aura::Window* window = new aura::Window(NULL); |
| 97 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 97 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 98 window->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
| 99 window->Init(aura::WINDOW_LAYER_TEXTURED); | 99 window->Init(ui::LAYER_TEXTURED); |
| 100 ParentWindowInPrimaryRootWindow(window); | 100 ParentWindowInPrimaryRootWindow(window); |
| 101 return window; | 101 return window; |
| 102 } | 102 } |
| 103 | 103 |
| 104 aura::Window* CreateBrowserLikeWindow(const gfx::Rect& bounds) { | 104 aura::Window* CreateBrowserLikeWindow(const gfx::Rect& bounds) { |
| 105 aura::Window* window = CreateTestWindow(); | 105 aura::Window* window = CreateTestWindow(); |
| 106 window->SetBounds(bounds); | 106 window->SetBounds(bounds); |
| 107 wm::WindowState* window_state = wm::GetWindowState(window); | 107 wm::WindowState* window_state = wm::GetWindowState(window); |
| 108 window_state->set_window_position_managed(true); | 108 window_state->set_window_position_managed(true); |
| 109 window->Show(); | 109 window->Show(); |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 ui::EventTimeForNow()); | 1608 ui::EventTimeForNow()); |
| 1609 target = targeter->FindTargetForEvent(root, &touch); | 1609 target = targeter->FindTargetForEvent(root, &touch); |
| 1610 if (points[i].is_target_hit) | 1610 if (points[i].is_target_hit) |
| 1611 EXPECT_EQ(window.get(), target); | 1611 EXPECT_EQ(window.get(), target); |
| 1612 else | 1612 else |
| 1613 EXPECT_NE(window.get(), target); | 1613 EXPECT_NE(window.get(), target); |
| 1614 } | 1614 } |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 } // namespace ash | 1617 } // namespace ash |
| OLD | NEW |