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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_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 unified diff | Download patch
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 4680 matching lines...) Expand 10 before | Expand all | Expand 10 after
4691 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); 4691 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode());
4692 EXPECT_EQ(4U, sink_->message_count()); 4692 EXPECT_EQ(4U, sink_->message_count());
4693 } 4693 }
4694 4694
4695 #if defined(OS_CHROMEOS) 4695 #if defined(OS_CHROMEOS)
4696 // Check that when accessibility virtual keyboard is enabled, windows are 4696 // Check that when accessibility virtual keyboard is enabled, windows are
4697 // shifted up when focused and restored when focus is lost. 4697 // shifted up when focused and restored when focus is lost.
4698 TEST_F(RenderWidgetHostViewAuraTest, VirtualKeyboardFocusEnsureCaretInRect) { 4698 TEST_F(RenderWidgetHostViewAuraTest, VirtualKeyboardFocusEnsureCaretInRect) {
4699 // TODO (oshima): Test that overscroll occurs. 4699 // TODO (oshima): Test that overscroll occurs.
4700 4700
4701 // Enable new virtual keyboard behavior.
4702 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
4703 if (!command_line->HasSwitch(::switches::kUseNewVirtualKeyboardBehavior))
4704 command_line->AppendSwitch(::switches::kUseNewVirtualKeyboardBehavior);
4705
4706 view_->InitAsChild(nullptr); 4701 view_->InitAsChild(nullptr);
4707 aura::client::ParentWindowWithContext( 4702 aura::client::ParentWindowWithContext(
4708 view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), 4703 view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(),
4709 gfx::Rect()); 4704 gfx::Rect());
4710 aura::Window* root_window = parent_view_->GetNativeView()->GetRootWindow(); 4705 aura::Window* root_window = parent_view_->GetNativeView()->GetRootWindow();
4711 wm::DefaultScreenPositionClient screen_position_client; 4706 wm::DefaultScreenPositionClient screen_position_client;
4712 aura::client::SetScreenPositionClient(root_window, &screen_position_client); 4707 aura::client::SetScreenPositionClient(root_window, &screen_position_client);
4713 4708
4714 const gfx::Rect orig_view_bounds = gfx::Rect(0, 300, 400, 200); 4709 const gfx::Rect orig_view_bounds = gfx::Rect(0, 300, 400, 200);
4715 const gfx::Rect shifted_view_bounds = gfx::Rect(0, 200, 400, 200); 4710 const gfx::Rect shifted_view_bounds = gfx::Rect(0, 200, 400, 200);
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 // There is no composition in the beginning. 5542 // There is no composition in the beginning.
5548 EXPECT_FALSE(has_composition_text()); 5543 EXPECT_FALSE(has_composition_text());
5549 SetHasCompositionTextToTrue(); 5544 SetHasCompositionTextToTrue();
5550 view->ImeCancelComposition(); 5545 view->ImeCancelComposition();
5551 // The composition must have been canceled. 5546 // The composition must have been canceled.
5552 EXPECT_FALSE(has_composition_text()); 5547 EXPECT_FALSE(has_composition_text());
5553 } 5548 }
5554 } 5549 }
5555 5550
5556 } // namespace content 5551 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698