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

Side by Side Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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/video_detector_unittest.cc ('k') | ash/wm/window_positioner_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/window_cycle_controller.h" 5 #include "ash/common/wm/window_cycle_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/common/focus_cycler.h" 10 #include "ash/common/focus_cycler.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 ASSERT_EQ(4u, GetWindows(controller).size()); 387 ASSERT_EQ(4u, GetWindows(controller).size());
388 EXPECT_EQ(window0.get(), GetWindows(controller)[0]); 388 EXPECT_EQ(window0.get(), GetWindows(controller)[0]);
389 EXPECT_EQ(window3.get(), GetWindows(controller)[1]); 389 EXPECT_EQ(window3.get(), GetWindows(controller)[1]);
390 EXPECT_EQ(window2.get(), GetWindows(controller)[2]); 390 EXPECT_EQ(window2.get(), GetWindows(controller)[2]);
391 EXPECT_EQ(window1.get(), GetWindows(controller)[3]); 391 EXPECT_EQ(window1.get(), GetWindows(controller)[3]);
392 392
393 controller->CompleteCycling(); 393 controller->CompleteCycling();
394 } 394 }
395 395
396 TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) { 396 TEST_F(WindowCycleControllerTest, AlwaysOnTopMultipleRootWindows) {
397 if (!SupportsMultipleDisplays())
398 return;
399
400 // Set up a second root window 397 // Set up a second root window
401 UpdateDisplay("1000x600,600x400"); 398 UpdateDisplay("1000x600,600x400");
402 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 399 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
403 ASSERT_EQ(2U, root_windows.size()); 400 ASSERT_EQ(2U, root_windows.size());
404 401
405 WindowCycleController* controller = WmShell::Get()->window_cycle_controller(); 402 WindowCycleController* controller = WmShell::Get()->window_cycle_controller();
406 403
407 // Create two windows in the primary root. 404 // Create two windows in the primary root.
408 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0)); 405 std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
409 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); 406 EXPECT_EQ(root_windows[0], window0->GetRootWindow());
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 // Base case sets the expectation for other cases. 761 // Base case sets the expectation for other cases.
765 if (expected_bounds.IsEmpty()) 762 if (expected_bounds.IsEmpty())
766 expected_bounds = display_relative_bounds; 763 expected_bounds = display_relative_bounds;
767 else 764 else
768 EXPECT_EQ(expected_bounds, display_relative_bounds); 765 EXPECT_EQ(expected_bounds, display_relative_bounds);
769 controller->CompleteCycling(); 766 controller->CompleteCycling();
770 } 767 }
771 } 768 }
772 769
773 } // namespace ash 770 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/video_detector_unittest.cc ('k') | ash/wm/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698