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

Side by Side Diff: ash/dip_unittest.cc

Issue 12313118: Refactor: Shelf Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 <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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698