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

Side by Side Diff: ash/common/wm/mru_window_tracker_unittest.cc

Issue 2740583002: Reenables MruWindowTrackerTest.MinimizedWindowsAreLru in mash (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/mru_window_tracker.h" 5 #include "ash/common/wm/mru_window_tracker.h"
6 6
7 #include "ash/common/test/ash_test.h" 7 #include "ash/common/test/ash_test.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 WmWindow::Windows window_list = mru_window_tracker()->BuildMruWindowList(); 45 WmWindow::Windows window_list = mru_window_tracker()->BuildMruWindowList();
46 ASSERT_EQ(3u, window_list.size()); 46 ASSERT_EQ(3u, window_list.size());
47 EXPECT_EQ(w1, window_list[0]); 47 EXPECT_EQ(w1, window_list[0]);
48 EXPECT_EQ(w2, window_list[1]); 48 EXPECT_EQ(w2, window_list[1]);
49 EXPECT_EQ(w3, window_list[2]); 49 EXPECT_EQ(w3, window_list[2]);
50 } 50 }
51 51
52 // Test that minimized windows are not treated specially. 52 // Test that minimized windows are not treated specially.
53 TEST_F(MruWindowTrackerTest, MinimizedWindowsAreLru) { 53 TEST_F(MruWindowTrackerTest, MinimizedWindowsAreLru) {
54 // TODO(sky): fix me. Fails in mash because of http://crbug.com/654887.
55 if (WmShell::Get()->IsRunningInMash())
56 return;
57
58 std::unique_ptr<WindowOwner> w1_owner(CreateTestWindow()); 54 std::unique_ptr<WindowOwner> w1_owner(CreateTestWindow());
59 WmWindow* w1 = w1_owner->window(); 55 WmWindow* w1 = w1_owner->window();
60 std::unique_ptr<WindowOwner> w2_owner(CreateTestWindow()); 56 std::unique_ptr<WindowOwner> w2_owner(CreateTestWindow());
61 WmWindow* w2 = w2_owner->window(); 57 WmWindow* w2 = w2_owner->window();
62 std::unique_ptr<WindowOwner> w3_owner(CreateTestWindow()); 58 std::unique_ptr<WindowOwner> w3_owner(CreateTestWindow());
63 WmWindow* w3 = w3_owner->window(); 59 WmWindow* w3 = w3_owner->window();
64 std::unique_ptr<WindowOwner> w4_owner(CreateTestWindow()); 60 std::unique_ptr<WindowOwner> w4_owner(CreateTestWindow());
65 WmWindow* w4 = w4_owner->window(); 61 WmWindow* w4 = w4_owner->window();
66 std::unique_ptr<WindowOwner> w5_owner(CreateTestWindow()); 62 std::unique_ptr<WindowOwner> w5_owner(CreateTestWindow());
67 WmWindow* w5 = w5_owner->window(); 63 WmWindow* w5 = w5_owner->window();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 drag_container->AddChild(w1); 103 drag_container->AddChild(w1);
108 EXPECT_TRUE(w1->GetWindowState()->is_dragged()); 104 EXPECT_TRUE(w1->GetWindowState()->is_dragged());
109 105
110 // The dragged window should only be in the list once. 106 // The dragged window should only be in the list once.
111 WmWindow::Windows window_list = 107 WmWindow::Windows window_list =
112 mru_window_tracker()->BuildWindowListIgnoreModal(); 108 mru_window_tracker()->BuildWindowListIgnoreModal();
113 EXPECT_EQ(1, std::count(window_list.begin(), window_list.end(), w1)); 109 EXPECT_EQ(1, std::count(window_list.begin(), window_list.end(), w1));
114 } 110 }
115 111
116 } // namespace ash 112 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698