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

Side by Side Diff: ash/wm/toplevel_window_event_handler_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
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/wm/toplevel_window_event_handler.h" 5 #include "ash/wm/toplevel_window_event_handler.h"
6 6
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm/wm_event.h" 8 #include "ash/common/wm/wm_event.h"
9 #include "ash/common/wm/workspace_controller.h" 9 #include "ash/common/wm/workspace_controller.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 FROM_HERE, base::Bind(&CheckHasCaptureAndReleaseCapture, 807 FROM_HERE, base::Bind(&CheckHasCaptureAndReleaseCapture,
808 base::Unretained(window.get()))); 808 base::Unretained(window.get())));
809 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL, 809 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL,
810 move_client->RunMoveLoop(window.get(), gfx::Vector2d(), 810 move_client->RunMoveLoop(window.get(), gfx::Vector2d(),
811 aura::client::WINDOW_MOVE_SOURCE_TOUCH)); 811 aura::client::WINDOW_MOVE_SOURCE_TOUCH));
812 } 812 }
813 813
814 // Tests that dragging a snapped window to another display updates the window's 814 // Tests that dragging a snapped window to another display updates the window's
815 // bounds correctly. 815 // bounds correctly.
816 TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) { 816 TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) {
817 if (!SupportsMultipleDisplays())
818 return;
819
820 UpdateDisplay("940x550,940x550"); 817 UpdateDisplay("940x550,940x550");
821 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); 818 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id();
822 int64_t secondary_id = display_manager()->GetSecondaryDisplay().id(); 819 int64_t secondary_id = display_manager()->GetSecondaryDisplay().id();
823 display::DisplayLayoutBuilder builder(primary_id); 820 display::DisplayLayoutBuilder builder(primary_id);
824 builder.SetSecondaryPlacement(secondary_id, display::DisplayPlacement::TOP, 821 builder.SetSecondaryPlacement(secondary_id, display::DisplayPlacement::TOP,
825 0); 822 0);
826 display_manager()->SetLayoutForCurrentDisplays(builder.Build()); 823 display_manager()->SetLayoutForCurrentDisplays(builder.Build());
827 824
828 const gfx::Size initial_window_size(330, 230); 825 const gfx::Size initial_window_size(330, 230);
829 std::unique_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegateAndType( 826 std::unique_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegateAndType(
(...skipping 19 matching lines...) Expand all
849 // The window is now fully contained in the secondary display. 846 // The window is now fully contained in the secondary display.
850 EXPECT_TRUE(display_manager()->GetSecondaryDisplay().bounds().Contains( 847 EXPECT_TRUE(display_manager()->GetSecondaryDisplay().bounds().Contains(
851 w1->GetBoundsInScreen())); 848 w1->GetBoundsInScreen()));
852 } 849 }
853 850
854 // Showing the resize shadows when the mouse is over the window edges is tested 851 // Showing the resize shadows when the mouse is over the window edges is tested
855 // in resize_shadow_and_cursor_test.cc 852 // in resize_shadow_and_cursor_test.cc
856 853
857 } // namespace test 854 } // namespace test
858 } // namespace ash 855 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/system_modal_container_layout_manager_unittest.cc ('k') | ash/wm/video_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698