| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_controller.h" | 5 #include "ui/keyboard/keyboard_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 | 465 |
| 466 class KeyboardControllerAnimationTest : public KeyboardControllerTest, | 466 class KeyboardControllerAnimationTest : public KeyboardControllerTest, |
| 467 public KeyboardControllerObserver { | 467 public KeyboardControllerObserver { |
| 468 public: | 468 public: |
| 469 KeyboardControllerAnimationTest() {} | 469 KeyboardControllerAnimationTest() {} |
| 470 virtual ~KeyboardControllerAnimationTest() {} | 470 virtual ~KeyboardControllerAnimationTest() {} |
| 471 | 471 |
| 472 virtual void SetUp() OVERRIDE { | 472 virtual void SetUp() OVERRIDE { |
| 473 // We cannot short-circuit animations for this test. | 473 // We cannot short-circuit animations for this test. |
| 474 ui::ScopedAnimationDurationScaleMode test_duration_mode( | 474 ui::ScopedAnimationDurationScaleMode normal_duration_mode( |
| 475 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); | 475 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); |
| 476 | 476 |
| 477 KeyboardControllerTest::SetUp(); | 477 KeyboardControllerTest::SetUp(); |
| 478 | 478 |
| 479 const gfx::Rect& root_bounds = root_window()->bounds(); | 479 const gfx::Rect& root_bounds = root_window()->bounds(); |
| 480 keyboard_container()->SetBounds(root_bounds); | 480 keyboard_container()->SetBounds(root_bounds); |
| 481 root_window()->AddChild(keyboard_container()); | 481 root_window()->AddChild(keyboard_container()); |
| 482 controller()->AddObserver(this); | 482 controller()->AddObserver(this); |
| 483 } | 483 } |
| 484 | 484 |
| 485 virtual void TearDown() OVERRIDE { | 485 virtual void TearDown() OVERRIDE { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 SetFocus(&input_client); | 600 SetFocus(&input_client); |
| 601 EXPECT_TRUE(keyboard_container->IsVisible()); | 601 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 602 | 602 |
| 603 SetFocus(&no_input_client); | 603 SetFocus(&no_input_client); |
| 604 // Keyboard should not hide itself after lost focus. | 604 // Keyboard should not hide itself after lost focus. |
| 605 EXPECT_TRUE(keyboard_container->IsVisible()); | 605 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 606 EXPECT_FALSE(WillHideKeyboard()); | 606 EXPECT_FALSE(WillHideKeyboard()); |
| 607 } | 607 } |
| 608 | 608 |
| 609 } // namespace keyboard | 609 } // namespace keyboard |
| OLD | NEW |