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

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

Issue 2732573002: chromeos: moves more ash tests to run on mash (Closed)
Patch Set: fix bug ref 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
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/common/wm_shell.h"
10 #include "ash/public/cpp/shell_window_ids.h" 11 #include "ash/public/cpp/shell_window_ids.h"
11 #include "ash/root_window_controller.h" 12 #include "ash/root_window_controller.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "ash/test/ash_test_base.h" 14 #include "ash/test/ash_test_base.h"
14 #include "ash/wm/resize_shadow.h" 15 #include "ash/wm/resize_shadow.h"
15 #include "ash/wm/resize_shadow_controller.h" 16 #include "ash/wm/resize_shadow_controller.h"
16 #include "ash/wm/window_state_aura.h" 17 #include "ash/wm/window_state_aura.h"
17 #include "ash/wm/window_util.h" 18 #include "ash/wm/window_util.h"
18 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
19 #include "base/threading/thread_task_runner_handle.h" 20 #include "base/threading/thread_task_runner_handle.h"
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 FROM_HERE, base::Bind(&CheckHasCaptureAndReleaseCapture, 808 FROM_HERE, base::Bind(&CheckHasCaptureAndReleaseCapture,
808 base::Unretained(window.get()))); 809 base::Unretained(window.get())));
809 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL, 810 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL,
810 move_client->RunMoveLoop(window.get(), gfx::Vector2d(), 811 move_client->RunMoveLoop(window.get(), gfx::Vector2d(),
811 aura::client::WINDOW_MOVE_SOURCE_TOUCH)); 812 aura::client::WINDOW_MOVE_SOURCE_TOUCH));
812 } 813 }
813 814
814 // Tests that dragging a snapped window to another display updates the window's 815 // Tests that dragging a snapped window to another display updates the window's
815 // bounds correctly. 816 // bounds correctly.
816 TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) { 817 TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) {
818 // TODO: SetLayoutForCurrentDisplays() needs to ported to mash.
819 // http://crbug.com/698043.
820 if (WmShell::Get()->IsRunningInMash())
821 return;
822
817 UpdateDisplay("940x550,940x550"); 823 UpdateDisplay("940x550,940x550");
818 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); 824 int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id();
819 int64_t secondary_id = display_manager()->GetSecondaryDisplay().id(); 825 int64_t secondary_id = display_manager()->GetSecondaryDisplay().id();
820 display::DisplayLayoutBuilder builder(primary_id); 826 display::DisplayLayoutBuilder builder(primary_id);
821 builder.SetSecondaryPlacement(secondary_id, display::DisplayPlacement::TOP, 827 builder.SetSecondaryPlacement(secondary_id, display::DisplayPlacement::TOP,
822 0); 828 0);
823 display_manager()->SetLayoutForCurrentDisplays(builder.Build()); 829 display_manager()->SetLayoutForCurrentDisplays(builder.Build());
824 830
825 const gfx::Size initial_window_size(330, 230); 831 const gfx::Size initial_window_size(330, 230);
826 std::unique_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegateAndType( 832 std::unique_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegateAndType(
(...skipping 19 matching lines...) Expand all
846 // The window is now fully contained in the secondary display. 852 // The window is now fully contained in the secondary display.
847 EXPECT_TRUE(display_manager()->GetSecondaryDisplay().bounds().Contains( 853 EXPECT_TRUE(display_manager()->GetSecondaryDisplay().bounds().Contains(
848 w1->GetBoundsInScreen())); 854 w1->GetBoundsInScreen()));
849 } 855 }
850 856
851 // Showing the resize shadows when the mouse is over the window edges is tested 857 // Showing the resize shadows when the mouse is over the window edges is tested
852 // in resize_shadow_and_cursor_test.cc 858 // in resize_shadow_and_cursor_test.cc
853 859
854 } // namespace test 860 } // namespace test
855 } // namespace ash 861 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698