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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 240443006: Remove native VK window height logic and wait for resizeTo to setup VK window height (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 keyboard::KeyboardController::GetInstance(); 182 keyboard::KeyboardController::GetInstance();
183 ASSERT_TRUE(keyboard); 183 ASSERT_TRUE(keyboard);
184 if (show == keyboard->keyboard_visible()) 184 if (show == keyboard->keyboard_visible())
185 return; 185 return;
186 186
187 // The animation has to run in order to get the notification. Run the 187 // The animation has to run in order to get the notification. Run the
188 // animation and wait until its finished. 188 // animation and wait until its finished.
189 ui::ScopedAnimationDurationScaleMode normal_duration_mode( 189 ui::ScopedAnimationDurationScaleMode normal_duration_mode(
190 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); 190 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
191 if (show) 191 if (show)
192 keyboard->ShowAndLockKeyboard(); 192 keyboard->ShowKeyboard(true);
193 else 193 else
194 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL); 194 keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL);
195 195
196 WaitForWindowAnimationToBeFinished(keyboard->GetContainerWindow()); 196 WaitForWindowAnimationToBeFinished(keyboard->GetContainerWindow());
197 197
198 DCHECK_EQ(show, keyboard->keyboard_visible()); 198 DCHECK_EQ(show, keyboard->keyboard_visible());
199 } 199 }
200 200
201 void WaitForWindowAnimationToBeFinished(aura::Window* window) { 201 void WaitForWindowAnimationToBeFinished(aura::Window* window) {
202 DCHECK(window); 202 DCHECK(window);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 // After the keyboard is gone, the window will remain where it was. 581 // After the keyboard is gone, the window will remain where it was.
582 ShowKeyboard(false); 582 ShowKeyboard(false);
583 EXPECT_NE(modal_bounds.ToString(), modal_window->bounds().ToString()); 583 EXPECT_NE(modal_bounds.ToString(), modal_window->bounds().ToString());
584 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); 584 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString());
585 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); 585 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x());
586 } 586 }
587 587
588 } // namespace test 588 } // namespace test
589 } // namespace ash 589 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698