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/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
9 #include "ash/common/shelf/shelf_model.h" | 9 #include "ash/common/shelf/shelf_model.h" |
10 #include "ash/common/shelf/shelf_types.h" | 10 #include "ash/common/shelf/shelf_types.h" |
11 #include "ash/common/shell_window_ids.h" | 11 #include "ash/common/shell_window_ids.h" |
12 #include "ash/common/wm/mru_window_tracker.h" | 12 #include "ash/common/wm/mru_window_tracker.h" |
13 #include "ash/common/wm/window_state.h" | 13 #include "ash/common/wm/window_state.h" |
| 14 #include "ash/common/wm_shell.h" |
14 #include "ash/screen_util.h" | 15 #include "ash/screen_util.h" |
15 #include "ash/shelf/shelf.h" | 16 #include "ash/shelf/shelf.h" |
16 #include "ash/shelf/shelf_button.h" | 17 #include "ash/shelf/shelf_button.h" |
17 #include "ash/shelf/shelf_layout_manager.h" | 18 #include "ash/shelf/shelf_layout_manager.h" |
18 #include "ash/shelf/shelf_util.h" | 19 #include "ash/shelf/shelf_util.h" |
19 #include "ash/shelf/shelf_view.h" | 20 #include "ash/shelf/shelf_view.h" |
20 #include "ash/shelf/shelf_widget.h" | 21 #include "ash/shelf/shelf_widget.h" |
21 #include "ash/shell.h" | 22 #include "ash/shell.h" |
22 #include "ash/test/ash_test_base.h" | 23 #include "ash/test/ash_test_base.h" |
23 #include "ash/test/shelf_test_api.h" | 24 #include "ash/test/shelf_test_api.h" |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // we exit fullscreen mode. | 727 // we exit fullscreen mode. |
727 w3.reset(CreatePanelWindow(bounds)); | 728 w3.reset(CreatePanelWindow(bounds)); |
728 | 729 |
729 EXPECT_FALSE(w1->IsVisible()); | 730 EXPECT_FALSE(w1->IsVisible()); |
730 EXPECT_FALSE(w2->IsVisible()); | 731 EXPECT_FALSE(w2->IsVisible()); |
731 EXPECT_FALSE(w3->IsVisible()); | 732 EXPECT_FALSE(w3->IsVisible()); |
732 | 733 |
733 // While in full-screen mode, the panel windows should still be in the | 734 // While in full-screen mode, the panel windows should still be in the |
734 // switchable window list - http://crbug.com/313919. | 735 // switchable window list - http://crbug.com/313919. |
735 aura::Window::Windows switchable_window_list = WmWindowAura::ToAuraWindows( | 736 aura::Window::Windows switchable_window_list = WmWindowAura::ToAuraWindows( |
736 Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList()); | 737 WmShell::Get()->mru_window_tracker()->BuildMruWindowList()); |
737 EXPECT_EQ(3u, switchable_window_list.size()); | 738 EXPECT_EQ(3u, switchable_window_list.size()); |
738 EXPECT_NE(switchable_window_list.end(), | 739 EXPECT_NE(switchable_window_list.end(), |
739 std::find(switchable_window_list.begin(), | 740 std::find(switchable_window_list.begin(), |
740 switchable_window_list.end(), w1.get())); | 741 switchable_window_list.end(), w1.get())); |
741 EXPECT_NE(switchable_window_list.end(), | 742 EXPECT_NE(switchable_window_list.end(), |
742 std::find(switchable_window_list.begin(), | 743 std::find(switchable_window_list.begin(), |
743 switchable_window_list.end(), w2.get())); | 744 switchable_window_list.end(), w2.get())); |
744 EXPECT_NE(switchable_window_list.end(), | 745 EXPECT_NE(switchable_window_list.end(), |
745 std::find(switchable_window_list.begin(), | 746 std::find(switchable_window_list.begin(), |
746 switchable_window_list.end(), w3.get())); | 747 switchable_window_list.end(), w3.get())); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); | 808 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); |
808 target = targeter->FindTargetForEvent(root, &touch); | 809 target = targeter->FindTargetForEvent(root, &touch); |
809 EXPECT_NE(w.get(), target); | 810 EXPECT_NE(w.get(), target); |
810 } | 811 } |
811 | 812 |
812 INSTANTIATE_TEST_CASE_P(LtrRtl, | 813 INSTANTIATE_TEST_CASE_P(LtrRtl, |
813 PanelLayoutManagerTextDirectionTest, | 814 PanelLayoutManagerTextDirectionTest, |
814 testing::Bool()); | 815 testing::Bool()); |
815 | 816 |
816 } // namespace ash | 817 } // namespace ash |
OLD | NEW |