forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a full screen virtual keyboard to virtual keyboard root window
BUG=310331 TEST= 1. add keyboard-usability-experiment flag 2. hook up an external screen 3. boot device expected: a full screen keyboard on one of the screen Review URL: https://codereview.chromium.org/47873003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235502 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
bshe@chromium.org
committed
Nov 16, 2013
1 parent
5e01b54
commit a53dcc9
Showing
21 changed files
with
195 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
ash/display/virtual_keyboard_window_controller_unittest.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "ash/display/virtual_keyboard_window_controller.h" | ||
|
||
#include "ash/ash_switches.h" | ||
#include "ash/display/display_controller.h" | ||
#include "ash/root_window_controller.h" | ||
#include "ash/shell.h" | ||
#include "ash/shell_window_ids.h" | ||
#include "ash/test/ash_test_base.h" | ||
#include "base/command_line.h" | ||
#include "ui/keyboard/keyboard_switches.h" | ||
|
||
namespace ash { | ||
namespace test { | ||
|
||
class VirtualKeyboardWindowControllerTest : public AshTestBase { | ||
public: | ||
VirtualKeyboardWindowControllerTest() | ||
: virtual_keyboard_window_controller_(NULL) {} | ||
virtual ~VirtualKeyboardWindowControllerTest() {} | ||
|
||
virtual void SetUp() OVERRIDE { | ||
CommandLine::ForCurrentProcess()->AppendSwitchASCII( | ||
switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300"); | ||
CommandLine::ForCurrentProcess()->AppendSwitch( | ||
keyboard::switches::kKeyboardUsabilityExperiment); | ||
test::AshTestBase::SetUp(); | ||
} | ||
|
||
void set_virtual_keyboard_window_controller( | ||
internal::VirtualKeyboardWindowController* controller) { | ||
virtual_keyboard_window_controller_ = controller; | ||
} | ||
|
||
internal::RootWindowController* root_window_controller() { | ||
return virtual_keyboard_window_controller_-> | ||
root_window_controller_for_test(); | ||
} | ||
|
||
private: | ||
internal::VirtualKeyboardWindowController* | ||
virtual_keyboard_window_controller_; | ||
DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest); | ||
}; | ||
|
||
|
||
TEST_F(VirtualKeyboardWindowControllerTest, VirtualKeyboardWindowTest) { | ||
if (!SupportsMultipleDisplays()) | ||
return; | ||
RunAllPendingInMessageLoop(); | ||
set_virtual_keyboard_window_controller( | ||
Shell::GetInstance()->display_controller()-> | ||
virtual_keyboard_window_controller()); | ||
EXPECT_TRUE(root_window_controller()); | ||
// Keyboard container is added to virtual keyboard window. | ||
EXPECT_TRUE(root_window_controller()->GetContainer( | ||
internal::kShellWindowId_VirtualKeyboardContainer)); | ||
} | ||
|
||
} // namespace test | ||
} // namespace ash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.