OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" | 5 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ui/aura/test/test_window_delegate.h" | 9 #include "ui/aura/test/test_window_delegate.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const content::MediaResponseCallback& callback) OVERRIDE {} | 60 const content::MediaResponseCallback& callback) OVERRIDE {} |
61 | 61 |
62 private: | 62 private: |
63 scoped_ptr<aura::Window> window_; | 63 scoped_ptr<aura::Window> window_; |
64 aura::test::TestWindowDelegate delegate_; | 64 aura::test::TestWindowDelegate delegate_; |
65 scoped_ptr<ui::InputMethod> input_method_; | 65 scoped_ptr<ui::InputMethod> input_method_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(TestAshKeyboardControllerProxy); | 67 DISALLOW_COPY_AND_ASSIGN(TestAshKeyboardControllerProxy); |
68 }; | 68 }; |
69 | 69 |
| 70 // TODO(bshe): Move this test back to unit test if |
| 71 // ui::SetUpInputMethodFactoryForTesting() is safe to be called in unit test. |
70 class AshKeyboardControllerProxyTest : public ash::test::AshTestBase { | 72 class AshKeyboardControllerProxyTest : public ash::test::AshTestBase { |
71 public: | 73 public: |
72 AshKeyboardControllerProxyTest() {} | 74 AshKeyboardControllerProxyTest() {} |
73 | 75 |
74 virtual ~AshKeyboardControllerProxyTest() {} | 76 virtual ~AshKeyboardControllerProxyTest() {} |
75 | 77 |
76 // AshTestBase: | 78 // AshTestBase: |
77 virtual void SetUp() OVERRIDE; | 79 virtual void SetUp() OVERRIDE; |
78 virtual void TearDown() OVERRIDE; | 80 virtual void TearDown() OVERRIDE; |
79 | 81 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // finishes. | 149 // finishes. |
148 EXPECT_TRUE(keyboard_container->IsVisible()); | 150 EXPECT_TRUE(keyboard_container->IsVisible()); |
149 EXPECT_TRUE(proxy()->GetKeyboardWindow()->IsVisible()); | 151 EXPECT_TRUE(proxy()->GetKeyboardWindow()->IsVisible()); |
150 | 152 |
151 RunAnimationForLayer(layer); | 153 RunAnimationForLayer(layer); |
152 EXPECT_FALSE(keyboard_container->IsVisible()); | 154 EXPECT_FALSE(keyboard_container->IsVisible()); |
153 EXPECT_FALSE(proxy()->GetKeyboardWindow()->IsVisible()); | 155 EXPECT_FALSE(proxy()->GetKeyboardWindow()->IsVisible()); |
154 EXPECT_EQ(0.0, layer->opacity()); | 156 EXPECT_EQ(0.0, layer->opacity()); |
155 EXPECT_EQ(transform, layer->transform()); | 157 EXPECT_EQ(transform, layer->transform()); |
156 } | 158 } |
OLD | NEW |