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

Side by Side Diff: ash/screen_ash_unittest.cc

Issue 10979090: Simplify WorkAreaBounds access logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/screen_ash.cc ('k') | ash/wm/shelf_layout_manager.h » ('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 "ash/screen_ash.h" 5 #include "ash/screen_ash.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 22 matching lines...) Expand all
33 secondary->Show(); 33 secondary->Show();
34 34
35 // Maximized bounds 35 // Maximized bounds
36 EXPECT_EQ("0,0 600x597", 36 EXPECT_EQ("0,0 600x597",
37 ScreenAsh::GetMaximizedWindowBoundsInParent( 37 ScreenAsh::GetMaximizedWindowBoundsInParent(
38 primary->GetNativeView()).ToString()); 38 primary->GetNativeView()).ToString());
39 EXPECT_EQ("0,0 500x500", 39 EXPECT_EQ("0,0 500x500",
40 ScreenAsh::GetMaximizedWindowBoundsInParent( 40 ScreenAsh::GetMaximizedWindowBoundsInParent(
41 secondary->GetNativeView()).ToString()); 41 secondary->GetNativeView()).ToString());
42 42
43 // Unmaximized work area bounds
44 EXPECT_EQ("0,0 600x597",
45 ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
46 primary->GetNativeView()).ToString());
47 EXPECT_EQ("0,0 500x500",
48 ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
49 secondary->GetNativeView()).ToString());
50
51 // Display bounds 43 // Display bounds
52 EXPECT_EQ("0,0 600x600", 44 EXPECT_EQ("0,0 600x600",
53 ScreenAsh::GetDisplayBoundsInParent( 45 ScreenAsh::GetDisplayBoundsInParent(
54 primary->GetNativeView()).ToString()); 46 primary->GetNativeView()).ToString());
55 EXPECT_EQ("0,0 500x500", 47 EXPECT_EQ("0,0 500x500",
56 ScreenAsh::GetDisplayBoundsInParent( 48 ScreenAsh::GetDisplayBoundsInParent(
57 secondary->GetNativeView()).ToString()); 49 secondary->GetNativeView()).ToString());
58 50
59 // Work area bounds 51 // Work area bounds
60 EXPECT_EQ("0,0 600x597", 52 EXPECT_EQ("0,0 600x597",
(...skipping 29 matching lines...) Expand all
90 ScreenAsh::ConvertRectToScreen( 82 ScreenAsh::ConvertRectToScreen(
91 primary->GetNativeView(), gfx::Rect(30, 30, 100, 100)).ToString()); 83 primary->GetNativeView(), gfx::Rect(30, 30, 100, 100)).ToString());
92 EXPECT_EQ( 84 EXPECT_EQ(
93 "650,50 100x100", 85 "650,50 100x100",
94 ScreenAsh::ConvertRectToScreen( 86 ScreenAsh::ConvertRectToScreen(
95 secondary->GetNativeView(), gfx::Rect(40, 40, 100, 100)).ToString()); 87 secondary->GetNativeView(), gfx::Rect(40, 40, 100, 100)).ToString());
96 } 88 }
97 89
98 } // namespace test 90 } // namespace test
99 } // namespace ash 91 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_ash.cc ('k') | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698