OLD | NEW |
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/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
| 10 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
11 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
12 #include "ash/wm/window_properties.h" | 13 #include "ash/wm/window_properties.h" |
13 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "ui/aura/client/activation_client.h" | 16 #include "ui/aura/client/activation_client.h" |
16 #include "ui/aura/root_window.h" | 17 #include "ui/aura/root_window.h" |
17 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
18 #include "ui/compositor/layer.h" | 19 #include "ui/compositor/layer.h" |
19 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); | 57 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); |
57 work_area = display_2x.work_area(); | 58 work_area = display_2x.work_area(); |
58 EXPECT_EQ("0,0 1000x852", work_area.ToString()); | 59 EXPECT_EQ("0,0 1000x852", work_area.ToString()); |
59 EXPECT_EQ("0,0,48,0", display_2x.bounds().InsetsFrom(work_area).ToString()); | 60 EXPECT_EQ("0,0,48,0", display_2x.bounds().InsetsFrom(work_area).ToString()); |
60 | 61 |
61 // Sanity check if the workarea's inset hight is same as | 62 // Sanity check if the workarea's inset hight is same as |
62 // the launcher's height. | 63 // the launcher's height. |
63 Launcher* launcher = Launcher::ForPrimaryDisplay(); | 64 Launcher* launcher = Launcher::ForPrimaryDisplay(); |
64 EXPECT_EQ( | 65 EXPECT_EQ( |
65 display_2x.bounds().InsetsFrom(work_area).height(), | 66 display_2x.bounds().InsetsFrom(work_area).height(), |
66 launcher->widget()->GetNativeView()->layer()->bounds().height()); | 67 launcher->shelf_widget()->GetNativeView()->layer()->bounds().height()); |
67 } | 68 } |
68 | 69 |
69 } // namespace ash | 70 } // namespace ash |
OLD | NEW |