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

Unified Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2871243003: Enable new-virtual-keyboard-behavior flag by default. (Closed)
Patch Set: keep sorted the declarations Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_keyboard_unittest.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index a5b5d0d081a69db090cc635919975d26f1d5762e..9efd8e2c31bf7d4d2c75c9fb098bc3eefa92696f 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -116,6 +116,11 @@ display::Display GetDisplayNearestWindow(aura::Window* window) {
return display::Screen::GetScreen()->GetDisplayNearestWindow(window);
}
+void DisableNewVKMode() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->AppendSwitch(::switches::kDisableNewVirtualKeyboardBehavior);
+}
+
} // namespace
using WorkspaceLayoutManagerTest = test::AshTestBase;
@@ -1404,12 +1409,6 @@ class WorkspaceLayoutManagerKeyboardTest : public test::AshTestBase {
work_area.width(), work_area.height() / 2);
}
- void EnableNewVKMode() {
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(::switches::kUseNewVirtualKeyboardBehavior))
- command_line->AppendSwitch(::switches::kUseNewVirtualKeyboardBehavior);
- }
-
const gfx::Rect& keyboard_bounds() const { return keyboard_bounds_; }
private:
@@ -1423,6 +1422,9 @@ class WorkspaceLayoutManagerKeyboardTest : public test::AshTestBase {
// Tests that when a child window gains focus the top level window containing it
// is resized to fit the remaining workspace area.
TEST_F(WorkspaceLayoutManagerKeyboardTest, ChildWindowFocused) {
+ // Append the flag to cause work area change in non-sticky mode.
+ DisableNewVKMode();
+
// See comment at top of file for why this is needed.
WmWindowTestApi::GlobalMinimumSizeLock min_size_lock;
@@ -1455,6 +1457,9 @@ TEST_F(WorkspaceLayoutManagerKeyboardTest, ChildWindowFocused) {
}
TEST_F(WorkspaceLayoutManagerKeyboardTest, AdjustWindowForA11yKeyboard) {
+ // Append the flag to cause work area change in non-sticky mode.
+ DisableNewVKMode();
+
// See comment at top of file for why this is needed.
WmWindowTestApi::GlobalMinimumSizeLock min_size_lock;
InitKeyboardBounds();
@@ -1507,6 +1512,8 @@ TEST_F(WorkspaceLayoutManagerKeyboardTest, AdjustWindowForA11yKeyboard) {
}
TEST_F(WorkspaceLayoutManagerKeyboardTest, IgnoreKeyboardBoundsChange) {
+ // Append the flag to cause work area change in non-sticky mode.
+ DisableNewVKMode();
InitKeyboardBounds();
std::unique_ptr<aura::Window> window(CreateTestWindow(keyboard_bounds()));
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_keyboard_unittest.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698