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/shell_test_api.h" | 8 #include "ash/test/shell_test_api.h" |
9 #include "ash/test/test_activation_delegate.h" | 9 #include "ash/test/test_activation_delegate.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 597 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
598 gfx::Size size = root_window->bounds().size(); | 598 gfx::Size size = root_window->bounds().size(); |
599 EXPECT_EQ(gfx::Rect(size).ToString(), | 599 EXPECT_EQ(gfx::Rect(size).ToString(), |
600 Shell::GetScreen()->GetDisplayNearestPoint( | 600 Shell::GetScreen()->GetDisplayNearestPoint( |
601 gfx::Point()).bounds().ToString()); | 601 gfx::Point()).bounds().ToString()); |
602 | 602 |
603 // Rotate it clock-wise 90 degrees. | 603 // Rotate it clock-wise 90 degrees. |
604 gfx::Transform transform; | 604 gfx::Transform transform; |
605 transform.Translate(size.width(), 0); | 605 transform.Translate(size.width(), 0); |
606 transform.Rotate(90.0f); | 606 transform.Rotate(90.0f); |
607 root_window->GetHost()->SetTransform(transform); | 607 root_window->GetHost()->SetRootTransform(transform); |
608 | 608 |
609 test::TestActivationDelegate d1; | 609 test::TestActivationDelegate d1; |
610 aura::test::TestWindowDelegate wd; | 610 aura::test::TestWindowDelegate wd; |
611 scoped_ptr<aura::Window> w1( | 611 scoped_ptr<aura::Window> w1( |
612 CreateTestWindowInShellWithDelegate(&wd, 1, gfx::Rect(0, 15, 50, 50))); | 612 CreateTestWindowInShellWithDelegate(&wd, 1, gfx::Rect(0, 15, 50, 50))); |
613 d1.SetWindow(w1.get()); | 613 d1.SetWindow(w1.get()); |
614 w1->Show(); | 614 w1->Show(); |
615 | 615 |
616 gfx::Point miss_point(5, 5); | 616 gfx::Point miss_point(5, 5); |
617 transform.TransformPoint(&miss_point); | 617 transform.TransformPoint(&miss_point); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 observer_a.reset(); | 832 observer_a.reset(); |
833 observer_b.reset(); | 833 observer_b.reset(); |
834 generator.MoveMouseTo(50, 50); | 834 generator.MoveMouseTo(50, 50); |
835 EXPECT_TRUE(observer_a.did_visibility_change()); | 835 EXPECT_TRUE(observer_a.did_visibility_change()); |
836 EXPECT_FALSE(observer_b.did_visibility_change()); | 836 EXPECT_FALSE(observer_b.did_visibility_change()); |
837 EXPECT_TRUE(observer_a.is_cursor_visible()); | 837 EXPECT_TRUE(observer_a.is_cursor_visible()); |
838 } | 838 } |
839 #endif // defined(OS_CHROMEOS) | 839 #endif // defined(OS_CHROMEOS) |
840 | 840 |
841 } // namespace ash | 841 } // namespace ash |
OLD | NEW |