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

Side by Side Diff: ash/dip_unittest.cc

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/content/shell_content_state.cc ('k') | ash/drag_drop/drag_drop_controller_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/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/shelf/shelf_widget.h" 9 #include "ash/common/shelf/shelf_widget.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 20 matching lines...) Expand all
31 using DIPTest = test::AshMDTestBase; 31 using DIPTest = test::AshMDTestBase;
32 32
33 INSTANTIATE_TEST_CASE_P( 33 INSTANTIATE_TEST_CASE_P(
34 /* prefix intentionally left blank due to only one parameterization */, 34 /* prefix intentionally left blank due to only one parameterization */,
35 DIPTest, 35 DIPTest,
36 testing::Values(MaterialDesignController::NON_MATERIAL, 36 testing::Values(MaterialDesignController::NON_MATERIAL,
37 MaterialDesignController::MATERIAL_NORMAL, 37 MaterialDesignController::MATERIAL_NORMAL,
38 MaterialDesignController::MATERIAL_EXPERIMENTAL)); 38 MaterialDesignController::MATERIAL_EXPERIMENTAL));
39 39
40 // Test if the WM sets correct work area under different density. 40 // Test if the WM sets correct work area under different density.
41 // TODO(msw): Broken on Windows. http://crbug.com/584038
42 #if defined(OS_CHROMEOS)
43 TEST_P(DIPTest, WorkArea) { 41 TEST_P(DIPTest, WorkArea) {
44 const int height_offset = GetMdMaximizedWindowHeightOffset(); 42 const int height_offset = GetMdMaximizedWindowHeightOffset();
45 UpdateDisplay("1000x900*1.0f"); 43 UpdateDisplay("1000x900*1.0f");
46 44
47 aura::Window* root = Shell::GetPrimaryRootWindow(); 45 aura::Window* root = Shell::GetPrimaryRootWindow();
48 const display::Display display = 46 const display::Display display =
49 display::Screen::GetScreen()->GetDisplayNearestWindow(root); 47 display::Screen::GetScreen()->GetDisplayNearestWindow(root);
50 48
51 EXPECT_EQ("0,0 1000x900", display.bounds().ToString()); 49 EXPECT_EQ("0,0 1000x900", display.bounds().ToString());
52 gfx::Rect work_area = display.work_area(); 50 gfx::Rect work_area = display.work_area();
(...skipping 19 matching lines...) Expand all
72 work_area.ToString()); 70 work_area.ToString());
73 EXPECT_EQ(gfx::Insets(0, 0, 47 - height_offset, 0).ToString(), 71 EXPECT_EQ(gfx::Insets(0, 0, 47 - height_offset, 0).ToString(),
74 display_2x.bounds().InsetsFrom(work_area).ToString()); 72 display_2x.bounds().InsetsFrom(work_area).ToString());
75 73
76 // Sanity check if the workarea's inset hight is same as 74 // Sanity check if the workarea's inset hight is same as
77 // the shelf's height. 75 // the shelf's height.
78 WmShelf* shelf = GetPrimaryShelf(); 76 WmShelf* shelf = GetPrimaryShelf();
79 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(), 77 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(),
80 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height()); 78 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height());
81 } 79 }
82 #endif // defined(OS_CHROMEOS)
83 80
84 } // namespace ash 81 } // namespace ash
OLDNEW
« no previous file with comments | « ash/content/shell_content_state.cc ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698