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

Side by Side Diff: ash/dip_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
« no previous file with comments | « ash/common/wm/workspace_controller.cc ('k') | ash/display/root_window_transformers_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) 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/common/ash_switches.h" 8 #include "ash/common/ash_switches.h"
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/shelf/shelf.h"
11 #include "ash/common/shelf/shelf_widget.h" 10 #include "ash/common/shelf/shelf_widget.h"
11 #include "ash/common/shelf/wm_shelf.h"
12 #include "ash/display/display_manager.h" 12 #include "ash/display/display_manager.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/test/ash_md_test_base.h" 14 #include "ash/test/ash_md_test_base.h"
15 #include "ash/wm/window_properties.h" 15 #include "ash/wm/window_properties.h"
16 #include "ash/wm/window_util.h" 16 #include "ash/wm/window_util.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
19 #include "ui/aura/window_event_dispatcher.h" 19 #include "ui/aura/window_event_dispatcher.h"
20 #include "ui/compositor/layer.h" 20 #include "ui/compositor/layer.h"
21 #include "ui/display/display.h" 21 #include "ui/display/display.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Aura and views coordinates are in DIP, so they their bounds do not change. 69 // Aura and views coordinates are in DIP, so they their bounds do not change.
70 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); 70 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString());
71 work_area = display_2x.work_area(); 71 work_area = display_2x.work_area();
72 EXPECT_EQ(gfx::Rect(0, 0, 1000, 853 + height_offset).ToString(), 72 EXPECT_EQ(gfx::Rect(0, 0, 1000, 853 + height_offset).ToString(),
73 work_area.ToString()); 73 work_area.ToString());
74 EXPECT_EQ(gfx::Insets(0, 0, 47 - height_offset, 0).ToString(), 74 EXPECT_EQ(gfx::Insets(0, 0, 47 - height_offset, 0).ToString(),
75 display_2x.bounds().InsetsFrom(work_area).ToString()); 75 display_2x.bounds().InsetsFrom(work_area).ToString());
76 76
77 // Sanity check if the workarea's inset hight is same as 77 // Sanity check if the workarea's inset hight is same as
78 // the shelf's height. 78 // the shelf's height.
79 Shelf* shelf = Shelf::ForPrimaryDisplay(); 79 WmShelf* shelf = GetPrimaryShelf();
80 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(), 80 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(),
81 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height()); 81 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height());
82 } 82 }
83 #endif // defined(OS_CHROMEOS) 83 #endif // defined(OS_CHROMEOS)
84 84
85 } // namespace ash 85 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/workspace_controller.cc ('k') | ash/display/root_window_transformers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698