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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 506133002: Fixes moving fully occluded windows when the a11y keyboard shows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@window-resize
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.cc ('k') | no next file » | 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/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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698