Chromium Code Reviews| 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1073 | 1073 |
| 1074 gfx::Rect small_window_bound(50, 50, 100, 500); | 1074 gfx::Rect small_window_bound(50, 50, 100, 500); |
| 1075 window->SetBounds(small_window_bound); | 1075 window->SetBounds(small_window_bound); |
| 1076 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); | 1076 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); |
| 1077 ShowKeyboard(); | 1077 ShowKeyboard(); |
| 1078 EXPECT_EQ(gfx::Rect(50, 0, 100, available_height).ToString(), | 1078 EXPECT_EQ(gfx::Rect(50, 0, 100, available_height).ToString(), |
| 1079 window->bounds().ToString()); | 1079 window->bounds().ToString()); |
| 1080 HideKeyboard(); | 1080 HideKeyboard(); |
| 1081 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); | 1081 EXPECT_EQ(small_window_bound.ToString(), window->bounds().ToString()); |
| 1082 | 1082 |
| 1083 const gfx::Rect occluded_window_bound(50, keyboard_bounds.y(), | |
| 1084 100, keyboard_bounds.height()/2); | |
| 1085 window->SetBounds(occluded_window_bound); | |
| 1086 EXPECT_EQ(occluded_window_bound.ToString(), window->bounds().ToString()); | |
| 1087 ShowKeyboard(); | |
| 1088 EXPECT_EQ(gfx::Rect(occluded_window_bound.x(), | |
| 1089 occluded_window_bound.y() - keyboard_bounds.y()/2, | |
| 1090 occluded_window_bound.width(), | |
| 1091 occluded_window_bound.height()).ToString(), window->bounds().ToString()); | |
| 1092 HideKeyboard(); | |
| 1093 EXPECT_EQ(occluded_window_bound.ToString(), window->bounds().ToString()); | |
|
flackr
2014/08/25 15:25:30
This test looks like it would pass on master as th
| |
| 1094 | |
| 1083 if (switches::IsTextInputFocusManagerEnabled()) { | 1095 if (switches::IsTextInputFocusManagerEnabled()) { |
| 1084 ui::TextInputFocusManager::GetInstance()->BlurTextInputClient( | 1096 ui::TextInputFocusManager::GetInstance()->BlurTextInputClient( |
| 1085 &text_input_client); | 1097 &text_input_client); |
| 1086 } else { | 1098 } else { |
| 1087 input_method->SetFocusedTextInputClient(NULL); | 1099 input_method->SetFocusedTextInputClient(NULL); |
| 1088 } | 1100 } |
| 1089 } | 1101 } |
| 1090 | 1102 |
| 1091 } // namespace ash | 1103 } // namespace ash |
| OLD | NEW |