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

Side by Side Diff: ash/display/window_tree_host_manager_unittest.cc

Issue 2293183002: ash: Remove ash::Shelf in favor of ash::WmShelf (Closed)
Patch Set: rebase again Created 4 years, 3 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/display/window_tree_host_manager.h" 5 #include "ash/display/window_tree_host_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
11 #include "ash/common/material_design/material_design_controller.h" 11 #include "ash/common/material_design/material_design_controller.h"
12 #include "ash/common/shelf/shelf.h"
13 #include "ash/common/shelf/shelf_widget.h" 12 #include "ash/common/shelf/shelf_widget.h"
13 #include "ash/common/shelf/wm_shelf.h"
14 #include "ash/common/wm/window_state.h" 14 #include "ash/common/wm/window_state.h"
15 #include "ash/common/wm/wm_event.h" 15 #include "ash/common/wm/wm_event.h"
16 #include "ash/common/wm/wm_screen_util.h" 16 #include "ash/common/wm/wm_screen_util.h"
17 #include "ash/display/display_manager.h" 17 #include "ash/display/display_manager.h"
18 #include "ash/display/display_util.h" 18 #include "ash/display/display_util.h"
19 #include "ash/screen_util.h" 19 #include "ash/screen_util.h"
20 #include "ash/shell.h" 20 #include "ash/shell.h"
21 #include "ash/test/ash_md_test_base.h" 21 #include "ash/test/ash_md_test_base.h"
22 #include "ash/test/ash_test_base.h" 22 #include "ash/test/ash_test_base.h"
23 #include "ash/test/ash_test_helper.h" 23 #include "ash/test/ash_test_helper.h"
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 display_manager->SetLayoutForCurrentDisplays( 811 display_manager->SetLayoutForCurrentDisplays(
812 test::CreateDisplayLayout(display::DisplayPlacement::RIGHT, 50)); 812 test::CreateDisplayLayout(display::DisplayPlacement::RIGHT, 50));
813 813
814 EXPECT_NE(primary_display.id(), secondary_display.id()); 814 EXPECT_NE(primary_display.id(), secondary_display.id());
815 aura::Window* primary_root = 815 aura::Window* primary_root =
816 window_tree_host_manager->GetRootWindowForDisplayId(primary_display.id()); 816 window_tree_host_manager->GetRootWindowForDisplayId(primary_display.id());
817 aura::Window* secondary_root = 817 aura::Window* secondary_root =
818 window_tree_host_manager->GetRootWindowForDisplayId( 818 window_tree_host_manager->GetRootWindowForDisplayId(
819 secondary_display.id()); 819 secondary_display.id());
820 aura::Window* shelf_window = 820 aura::Window* shelf_window =
821 Shelf::ForPrimaryDisplay()->shelf_widget()->GetNativeView(); 821 GetPrimaryShelf()->shelf_widget()->GetNativeView();
822 EXPECT_TRUE(primary_root->Contains(shelf_window)); 822 EXPECT_TRUE(primary_root->Contains(shelf_window));
823 EXPECT_FALSE(secondary_root->Contains(shelf_window)); 823 EXPECT_FALSE(secondary_root->Contains(shelf_window));
824 EXPECT_NE(primary_root, secondary_root); 824 EXPECT_NE(primary_root, secondary_root);
825 EXPECT_EQ(primary_display.id(), 825 EXPECT_EQ(primary_display.id(),
826 display::Screen::GetScreen() 826 display::Screen::GetScreen()
827 ->GetDisplayNearestPoint(gfx::Point(-100, -100)) 827 ->GetDisplayNearestPoint(gfx::Point(-100, -100))
828 .id()); 828 .id());
829 EXPECT_EQ( 829 EXPECT_EQ(
830 primary_display.id(), 830 primary_display.id(),
831 display::Screen::GetScreen()->GetDisplayNearestWindow(nullptr).id()); 831 display::Screen::GetScreen()->GetDisplayNearestWindow(nullptr).id());
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 widget->GetNativeWindow()->GetRootWindow()); 1531 widget->GetNativeWindow()->GetRootWindow());
1532 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow()); 1532 event_generator.MoveMouseToCenterOf(widget->GetNativeWindow());
1533 1533
1534 UpdateDisplay("300x300"); 1534 UpdateDisplay("300x300");
1535 watcher.Stop(); 1535 watcher.Stop();
1536 1536
1537 widget->CloseNow(); 1537 widget->CloseNow();
1538 } 1538 }
1539 1539
1540 } // namespace ash 1540 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/root_window_transformers_unittest.cc ('k') | ash/first_run/first_run_helper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698