Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/mru_window_tracker_unittest.cc ('k') | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/wm/mru_window_tracker_unittest.cc ('k') | ash/wm/window_cycle_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698