Chromium Code Reviews| Index: ui/keyboard/keyboard_controller_unittest.cc |
| diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc |
| index 9c2023d782a087f3bfcd74534ebc117eda32ea1c..7efc81a893275ceb991f17e13230b1602fd9c018 100644 |
| --- a/ui/keyboard/keyboard_controller_unittest.cc |
| +++ b/ui/keyboard/keyboard_controller_unittest.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "ui/aura/client/focus_client.h" |
| +#include "ui/aura/layout_manager.h" |
| #include "ui/aura/root_window.h" |
| #include "ui/aura/test/aura_test_helper.h" |
| #include "ui/aura/test/event_generator.h" |
| @@ -334,6 +335,18 @@ TEST_F(KeyboardControllerTest, VisibilityChangeWithTextInputTypeChange) { |
| EXPECT_TRUE(keyboard_container->IsVisible()); |
| } |
| +TEST_F(KeyboardControllerTest, KeyboardResizingFromContents) { |
| + aura::Window* keyboard_container(controller()->GetContainerWindow()); |
| + aura::Window* keyboard_window(proxy()->GetKeyboardWindow()); |
| + keyboard_container->SetBounds(gfx::Rect(800, 600)); |
| + keyboard_container->AddChild(keyboard_window); |
| + |
| + EXPECT_EQ(180, keyboard_window->bounds().height()); |
|
sadrul
2013/12/05 07:54:55
Add some code here to verify that calling keyboard
Shu Chen
2013/12/05 08:21:04
Done.
|
| + proxy()->set_resizing_from_contents(true); |
| + keyboard_window->SetBounds(gfx::Rect(100, 80)); |
| + EXPECT_EQ(80, keyboard_window->bounds().height()); |
| +} |
| + |
| class KeyboardControllerUsabilityTest : public KeyboardControllerTest { |
| public: |
| KeyboardControllerUsabilityTest() {} |