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

Side by Side Diff: ash/wm/overview/window_selector_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
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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/accessibility_delegate.h" 9 #include "ash/common/accessibility_delegate.h"
10 #include "ash/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 } 1787 }
1788 1788
1789 // Tests first monitor when display order doesn't match left to right screen 1789 // Tests first monitor when display order doesn't match left to right screen
1790 // positions. 1790 // positions.
1791 TEST_P(WindowSelectorTest, MultiMonitorReversedOrder) { 1791 TEST_P(WindowSelectorTest, MultiMonitorReversedOrder) {
1792 if (!SupportsMultipleDisplays()) 1792 if (!SupportsMultipleDisplays())
1793 return; 1793 return;
1794 1794
1795 UpdateDisplay("400x400,400x400"); 1795 UpdateDisplay("400x400,400x400");
1796 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays( 1796 Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
1797 test::CreateDisplayLayout(display::DisplayPlacement::LEFT, 0)); 1797 test::CreateDisplayLayout(display_manager(),
1798 display::DisplayPlacement::LEFT, 0));
1798 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 1799 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
1799 gfx::Rect bounds1(-350, 0, 100, 100); 1800 gfx::Rect bounds1(-350, 0, 100, 100);
1800 gfx::Rect bounds2(0, 0, 100, 100); 1801 gfx::Rect bounds2(0, 0, 100, 100);
1801 std::unique_ptr<aura::Window> window2(CreateWindow(bounds2)); 1802 std::unique_ptr<aura::Window> window2(CreateWindow(bounds2));
1802 std::unique_ptr<aura::Window> window1(CreateWindow(bounds1)); 1803 std::unique_ptr<aura::Window> window1(CreateWindow(bounds1));
1803 EXPECT_EQ(root_windows[1], window1->GetRootWindow()); 1804 EXPECT_EQ(root_windows[1], window1->GetRootWindow());
1804 EXPECT_EQ(root_windows[0], window2->GetRootWindow()); 1805 EXPECT_EQ(root_windows[0], window2->GetRootWindow());
1805 1806
1806 ToggleOverview(); 1807 ToggleOverview();
1807 1808
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 bounds.y()); 2182 bounds.y());
2182 EXPECT_LE(transformed_rect.bottom(), bounds.bottom()); 2183 EXPECT_LE(transformed_rect.bottom(), bounds.bottom());
2183 EXPECT_NEAR(transformed_rect.x() - bounds.x(), 2184 EXPECT_NEAR(transformed_rect.x() - bounds.x(),
2184 bounds.right() - transformed_rect.right(), 1); 2185 bounds.right() - transformed_rect.right(), 1);
2185 EXPECT_NEAR( 2186 EXPECT_NEAR(
2186 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), 2187 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(),
2187 bounds.bottom() - transformed_rect.bottom(), 1); 2188 bounds.bottom() - transformed_rect.bottom(), 1);
2188 } 2189 }
2189 2190
2190 } // namespace ash 2191 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller_unittest.cc ('k') | ash/wm/panels/panel_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698