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

Side by Side Diff: ash/wm/dock/docked_window_layout_manager_unittest.cc

Issue 2355063002: Separate ash::test::DisplayManagerTestApi from ash (Closed)
Patch Set: review comment Created 4 years, 2 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/utility/screenshot_controller_unittest.cc ('k') | ash/wm/drag_window_resizer_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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/dock/docked_window_layout_manager.h" 5 #include "ash/common/wm/dock/docked_window_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/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/shell_window_ids.h" 9 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/wm/panels/panel_layout_manager.h" 10 #include "ash/common/wm/panels/panel_layout_manager.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // Adds three windows in bottom display and tests layout after a drag. 509 // Adds three windows in bottom display and tests layout after a drag.
510 TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) { 510 TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
511 if (!SupportsMultipleDisplays()) 511 if (!SupportsMultipleDisplays())
512 return; 512 return;
513 513
514 // Create two screen vertical layout. 514 // Create two screen vertical layout.
515 UpdateDisplay("600x1000,600x1000"); 515 UpdateDisplay("600x1000,600x1000");
516 // Layout the secondary display to the bottom of the primary. 516 // Layout the secondary display to the bottom of the primary.
517 ASSERT_GT(display::Screen::GetScreen()->GetNumDisplays(), 1); 517 ASSERT_GT(display::Screen::GetScreen()->GetNumDisplays(), 1);
518 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 518 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
519 test::CreateDisplayLayout(display::DisplayPlacement::BOTTOM, 0)); 519 test::CreateDisplayLayout(display_manager(),
520 display::DisplayPlacement::BOTTOM, 0));
520 521
521 std::unique_ptr<aura::Window> w1( 522 std::unique_ptr<aura::Window> w1(
522 CreateTestWindow(gfx::Rect(0, 1000, 201, 310))); 523 CreateTestWindow(gfx::Rect(0, 1000, 201, 310)));
523 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 1000 + 20); 524 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 1000 + 20);
524 std::unique_ptr<aura::Window> w2( 525 std::unique_ptr<aura::Window> w2(
525 CreateTestWindow(gfx::Rect(0, 1000, 210, 310))); 526 CreateTestWindow(gfx::Rect(0, 1000, 210, 310)));
526 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 1000 + 500); 527 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 1000 + 500);
527 std::unique_ptr<aura::Window> w3( 528 std::unique_ptr<aura::Window> w3(
528 CreateTestWindow(gfx::Rect(0, 1000, 220, 310))); 529 CreateTestWindow(gfx::Rect(0, 1000, 220, 310)));
529 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 1000 + 600); 530 DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w3.get(), 1000 + 600);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height()); 809 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height());
809 } 810 }
810 811
811 // Tests run twice - on both panels and normal windows 812 // Tests run twice - on both panels and normal windows
812 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 813 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
813 DockedWindowLayoutManagerTest, 814 DockedWindowLayoutManagerTest,
814 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 815 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
815 ui::wm::WINDOW_TYPE_PANEL)); 816 ui::wm::WINDOW_TYPE_PANEL));
816 817
817 } // namespace ash 818 } // namespace ash
OLDNEW
« no previous file with comments | « ash/utility/screenshot_controller_unittest.cc ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698