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/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/display/display_layout.h" | 9 #include "ash/display/display_layout.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 | 1132 |
1133 gfx::Rect small_window_bound(50, 50, 100, 500); | 1133 gfx::Rect small_window_bound(50, 50, 100, 500); |
1134 window->SetBounds(small_window_bound); | 1134 window->SetBounds(small_window_bound); |
1135 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); | 1135 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); |
1136 ShowKeyboard(); | 1136 ShowKeyboard(); |
1137 EXPECT_EQ(gfx::Rect(50, 0, 100, available_height).ToString(), | 1137 EXPECT_EQ(gfx::Rect(50, 0, 100, available_height).ToString(), |
1138 window->bounds().ToString()); | 1138 window->bounds().ToString()); |
1139 HideKeyboard(); | 1139 HideKeyboard(); |
1140 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); | 1140 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); |
1141 | 1141 |
| 1142 gfx::Rect occluded_window_bounds(50, |
| 1143 keyboard_bounds.y() + keyboard_bounds.height()/2, 50, |
| 1144 keyboard_bounds.height()/2); |
| 1145 window->SetBounds(occluded_window_bounds); |
| 1146 EXPECT_EQ(occluded_window_bounds.ToString(), |
| 1147 occluded_window_bounds.ToString()); |
| 1148 ShowKeyboard(); |
| 1149 EXPECT_EQ(gfx::Rect(50, |
| 1150 keyboard_bounds.y() - keyboard_bounds.height()/2, |
| 1151 occluded_window_bounds.width(), |
| 1152 occluded_window_bounds.height()).ToString(), |
| 1153 window->bounds().ToString()); |
| 1154 HideKeyboard(); |
| 1155 EXPECT_EQ(occluded_window_bounds.ToString(), window->bounds().ToString()); |
| 1156 |
1142 Blur(&text_input_client); | 1157 Blur(&text_input_client); |
1143 } | 1158 } |
1144 | 1159 |
1145 } // namespace ash | 1160 } // namespace ash |
OLD | NEW |