| 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/shelf/shelf.h" |
| 8 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
| 9 #include "ash/shelf/wm_shelf.h" | |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/test/ash_test_base.h" | 11 #include "ash/test/ash_test_base.h" |
| 12 #include "ash/wm/window_properties.h" | 12 #include "ash/wm/window_properties.h" |
| 13 #include "ash/wm/window_util.h" | 13 #include "ash/wm/window_util.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 #include "ui/aura/window_event_dispatcher.h" | 16 #include "ui/aura/window_event_dispatcher.h" |
| 17 #include "ui/compositor/layer.h" | 17 #include "ui/compositor/layer.h" |
| 18 #include "ui/display/display.h" | 18 #include "ui/display/display.h" |
| 19 #include "ui/display/manager/display_manager.h" | 19 #include "ui/display/manager/display_manager.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Aura and views coordinates are in DIP, so they their bounds do not change. | 56 // Aura and views coordinates are in DIP, so they their bounds do not change. |
| 57 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); | 57 EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); |
| 58 work_area = display_2x.work_area(); | 58 work_area = display_2x.work_area(); |
| 59 EXPECT_EQ(gfx::Rect(0, 0, 1000, 852).ToString(), work_area.ToString()); | 59 EXPECT_EQ(gfx::Rect(0, 0, 1000, 852).ToString(), work_area.ToString()); |
| 60 EXPECT_EQ(gfx::Insets(0, 0, 48, 0).ToString(), | 60 EXPECT_EQ(gfx::Insets(0, 0, 48, 0).ToString(), |
| 61 display_2x.bounds().InsetsFrom(work_area).ToString()); | 61 display_2x.bounds().InsetsFrom(work_area).ToString()); |
| 62 | 62 |
| 63 // Sanity check if the workarea's inset hight is same as | 63 // Sanity check if the workarea's inset hight is same as |
| 64 // the shelf's height. | 64 // the shelf's height. |
| 65 WmShelf* shelf = GetPrimaryShelf(); | 65 Shelf* shelf = GetPrimaryShelf(); |
| 66 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(), | 66 EXPECT_EQ(display_2x.bounds().InsetsFrom(work_area).height(), |
| 67 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height()); | 67 shelf->shelf_widget()->GetNativeView()->layer()->bounds().height()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace ash | 70 } // namespace ash |
| OLD | NEW |