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/display/screen_position_controller.h" | 5 #include "ash/display/screen_position_controller.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 class ScreenPositionControllerTest : public test::AshTestBase { | 57 class ScreenPositionControllerTest : public test::AshTestBase { |
58 public: | 58 public: |
59 ScreenPositionControllerTest() {} | 59 ScreenPositionControllerTest() {} |
60 ~ScreenPositionControllerTest() override {} | 60 ~ScreenPositionControllerTest() override {} |
61 | 61 |
62 void SetUp() override { | 62 void SetUp() override { |
63 AshTestBase::SetUp(); | 63 AshTestBase::SetUp(); |
64 window_.reset(new aura::Window(&window_delegate_)); | 64 window_.reset(new aura::Window(&window_delegate_)); |
65 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 65 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
66 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); | 66 window_->Init(ui::LAYER_NOT_DRAWN); |
67 ParentWindowInPrimaryRootWindow(window_.get()); | 67 ParentWindowInPrimaryRootWindow(window_.get()); |
68 window_->set_id(1); | 68 window_->set_id(1); |
69 } | 69 } |
70 | 70 |
71 void TearDown() override { | 71 void TearDown() override { |
72 window_.reset(); | 72 window_.reset(); |
73 AshTestBase::TearDown(); | 73 AshTestBase::TearDown(); |
74 } | 74 } |
75 | 75 |
76 // Converts a point (x, y) in host window's coordinate to screen and | 76 // Converts a point (x, y) in host window's coordinate to screen and |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // destroyed. | 357 // destroyed. |
358 EXPECT_FALSE(tracker.Contains(root_windows[1])); | 358 EXPECT_FALSE(tracker.Contains(root_windows[1])); |
359 | 359 |
360 // Check that we could convert all of the mouse events we got to screen | 360 // Check that we could convert all of the mouse events we got to screen |
361 // coordinates. | 361 // coordinates. |
362 EXPECT_TRUE(event_handler->could_convert_to_screen()); | 362 EXPECT_TRUE(event_handler->could_convert_to_screen()); |
363 } | 363 } |
364 | 364 |
365 } // namespace test | 365 } // namespace test |
366 } // namespace ash | 366 } // namespace ash |
OLD | NEW |