| 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/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "ash/shell_window_ids.h" | 6 #include "ash/shell_window_ids.h" |
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "ash/test/test_activation_delegate.h" | 8 #include "ash/test/test_activation_delegate.h" |
| 9 #include "ash/wm/activation_controller.h" | 9 #include "ash/wm/activation_controller.h" |
| 10 #include "ash/wm/cursor_manager.h" | 10 #include "ash/wm/cursor_manager.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 #if defined(OS_MACOSX) | 459 #if defined(OS_MACOSX) |
| 460 #define MAYBE_TransformActivate FAILS_TransformActivate | 460 #define MAYBE_TransformActivate FAILS_TransformActivate |
| 461 #else | 461 #else |
| 462 #define MAYBE_TransformActivate TransformActivate | 462 #define MAYBE_TransformActivate TransformActivate |
| 463 #endif | 463 #endif |
| 464 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { | 464 TEST_F(WindowManagerTest, MAYBE_TransformActivate) { |
| 465 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); | 465 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); |
| 466 gfx::Size size = root_window->bounds().size(); | 466 gfx::Size size = root_window->bounds().size(); |
| 467 EXPECT_EQ( | 467 EXPECT_EQ( |
| 468 gfx::Rect(size).ToString(), | 468 gfx::Rect(size).ToString(), |
| 469 gfx::Screen::GetDisplayNearestPoint(gfx::Point()).bounds().ToString()); | 469 Shell::GetAshScreen()->GetDisplayNearestPoint( |
| 470 gfx::Point()).bounds().ToString()); |
| 470 | 471 |
| 471 // Rotate it clock-wise 90 degrees. | 472 // Rotate it clock-wise 90 degrees. |
| 472 ui::Transform transform; | 473 ui::Transform transform; |
| 473 transform.SetRotate(90.0f); | 474 transform.SetRotate(90.0f); |
| 474 transform.ConcatTranslate(size.width(), 0); | 475 transform.ConcatTranslate(size.width(), 0); |
| 475 root_window->SetTransform(transform); | 476 root_window->SetTransform(transform); |
| 476 | 477 |
| 477 test::TestActivationDelegate d1; | 478 test::TestActivationDelegate d1; |
| 478 aura::test::TestWindowDelegate wd; | 479 aura::test::TestWindowDelegate wd; |
| 479 scoped_ptr<aura::Window> w1( | 480 scoped_ptr<aura::Window> w1( |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 cursor_manager->ShowCursor(true); | 621 cursor_manager->ShowCursor(true); |
| 621 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); | 622 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); |
| 622 EXPECT_TRUE(cursor_manager->cursor_visible()); | 623 EXPECT_TRUE(cursor_manager->cursor_visible()); |
| 623 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2); | 624 root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&touch_pressed2); |
| 624 EXPECT_FALSE(cursor_manager->cursor_visible()); | 625 EXPECT_FALSE(cursor_manager->cursor_visible()); |
| 625 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); | 626 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_moved); |
| 626 EXPECT_TRUE(cursor_manager->cursor_visible()); | 627 EXPECT_TRUE(cursor_manager->cursor_visible()); |
| 627 } | 628 } |
| 628 | 629 |
| 629 } // namespace ash | 630 } // namespace ash |
| OLD | NEW |