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

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

Powered by Google App Engine
This is Rietveld 408576698