| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |