| 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/common/wm/panels/panel_layout_manager.h" | 5 #include "ash/common/wm/panels/panel_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
| 9 #include "ash/common/shelf/shelf_types.h" | 9 #include "ash/common/shelf/shelf_types.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 // w3 is created while in full-screen mode, should only become visible when | 732 // w3 is created while in full-screen mode, should only become visible when |
| 733 // we exit fullscreen mode. | 733 // we exit fullscreen mode. |
| 734 w3.reset(CreatePanelWindow(bounds)); | 734 w3.reset(CreatePanelWindow(bounds)); |
| 735 | 735 |
| 736 EXPECT_FALSE(w1->IsVisible()); | 736 EXPECT_FALSE(w1->IsVisible()); |
| 737 EXPECT_FALSE(w2->IsVisible()); | 737 EXPECT_FALSE(w2->IsVisible()); |
| 738 EXPECT_FALSE(w3->IsVisible()); | 738 EXPECT_FALSE(w3->IsVisible()); |
| 739 | 739 |
| 740 // While in full-screen mode, the panel windows should still be in the | 740 // While in full-screen mode, the panel windows should still be in the |
| 741 // switchable window list - http://crbug.com/313919. | 741 // switchable window list - http://crbug.com/313919. |
| 742 MruWindowTracker::WindowList switchable_window_list = | 742 aura::Window::Windows switchable_window_list = WmWindowAura::ToAuraWindows( |
| 743 Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList(); | 743 Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList()); |
| 744 EXPECT_EQ(3u, switchable_window_list.size()); | 744 EXPECT_EQ(3u, switchable_window_list.size()); |
| 745 EXPECT_NE(switchable_window_list.end(), | 745 EXPECT_NE(switchable_window_list.end(), |
| 746 std::find(switchable_window_list.begin(), switchable_window_list.end(), | 746 std::find(switchable_window_list.begin(), |
| 747 w1.get())); | 747 switchable_window_list.end(), w1.get())); |
| 748 EXPECT_NE(switchable_window_list.end(), | 748 EXPECT_NE(switchable_window_list.end(), |
| 749 std::find(switchable_window_list.begin(), switchable_window_list.end(), | 749 std::find(switchable_window_list.begin(), |
| 750 w2.get())); | 750 switchable_window_list.end(), w2.get())); |
| 751 EXPECT_NE(switchable_window_list.end(), | 751 EXPECT_NE(switchable_window_list.end(), |
| 752 std::find(switchable_window_list.begin(), switchable_window_list.end(), | 752 std::find(switchable_window_list.begin(), |
| 753 w3.get())); | 753 switchable_window_list.end(), w3.get())); |
| 754 | 754 |
| 755 SetShelfVisibilityState(Shell::GetPrimaryRootWindow(), SHELF_VISIBLE); | 755 SetShelfVisibilityState(Shell::GetPrimaryRootWindow(), SHELF_VISIBLE); |
| 756 RunAllPendingInMessageLoop(); | 756 RunAllPendingInMessageLoop(); |
| 757 | 757 |
| 758 // Windows should be restored to their prior state. | 758 // Windows should be restored to their prior state. |
| 759 EXPECT_TRUE(w1->IsVisible()); | 759 EXPECT_TRUE(w1->IsVisible()); |
| 760 EXPECT_FALSE(w2->IsVisible()); | 760 EXPECT_FALSE(w2->IsVisible()); |
| 761 EXPECT_TRUE(w3->IsVisible()); | 761 EXPECT_TRUE(w3->IsVisible()); |
| 762 } | 762 } |
| 763 | 763 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 // Hit test outside the left edge with a left-aligned shelf. | 813 // Hit test outside the left edge with a left-aligned shelf. |
| 814 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); | 814 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); |
| 815 target = targeter->FindTargetForEvent(root, &touch); | 815 target = targeter->FindTargetForEvent(root, &touch); |
| 816 EXPECT_NE(w.get(), target); | 816 EXPECT_NE(w.get(), target); |
| 817 } | 817 } |
| 818 | 818 |
| 819 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, | 819 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, |
| 820 testing::Bool()); | 820 testing::Bool()); |
| 821 | 821 |
| 822 } // namespace ash | 822 } // namespace ash |
| OLD | NEW |