| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/aura/client/focus_client.h" | 10 #include "ui/aura/client/focus_client.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 virtual ~TestTextInputClient() {} | 134 virtual ~TestTextInputClient() {} |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 // Overridden from ui::TextInputClient: | 137 // Overridden from ui::TextInputClient: |
| 138 virtual void SetCompositionText( | 138 virtual void SetCompositionText( |
| 139 const ui::CompositionText& composition) OVERRIDE {} | 139 const ui::CompositionText& composition) OVERRIDE {} |
| 140 virtual void ConfirmCompositionText() OVERRIDE {} | 140 virtual void ConfirmCompositionText() OVERRIDE {} |
| 141 virtual void ClearCompositionText() OVERRIDE {} | 141 virtual void ClearCompositionText() OVERRIDE {} |
| 142 virtual void InsertText(const base::string16& text) OVERRIDE {} | 142 virtual void InsertText(const base::string16& text) OVERRIDE {} |
| 143 virtual void InsertChar(base::char16 ch, int flags) OVERRIDE {} | 143 virtual void InsertChar(base::char16 ch, int flags) OVERRIDE {} |
| 144 virtual gfx::NativeWindow GetAttachedWindow() const OVERRIDE { | |
| 145 return static_cast<gfx::NativeWindow>(NULL); | |
| 146 } | |
| 147 virtual ui::TextInputType GetTextInputType() const OVERRIDE { | 144 virtual ui::TextInputType GetTextInputType() const OVERRIDE { |
| 148 return type_; | 145 return type_; |
| 149 } | 146 } |
| 150 virtual ui::TextInputMode GetTextInputMode() const OVERRIDE { | 147 virtual ui::TextInputMode GetTextInputMode() const OVERRIDE { |
| 151 return ui::TEXT_INPUT_MODE_DEFAULT; | 148 return ui::TEXT_INPUT_MODE_DEFAULT; |
| 152 } | 149 } |
| 153 virtual bool CanComposeInline() const OVERRIDE { return false; } | 150 virtual bool CanComposeInline() const OVERRIDE { return false; } |
| 154 virtual gfx::Rect GetCaretBounds() const OVERRIDE { return gfx::Rect(); } | 151 virtual gfx::Rect GetCaretBounds() const OVERRIDE { return gfx::Rect(); } |
| 155 | 152 |
| 156 virtual bool GetCompositionCharacterBounds( | 153 virtual bool GetCompositionCharacterBounds( |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 SetFocus(&input_client); | 607 SetFocus(&input_client); |
| 611 EXPECT_TRUE(keyboard_container->IsVisible()); | 608 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 612 | 609 |
| 613 SetFocus(&no_input_client); | 610 SetFocus(&no_input_client); |
| 614 // Keyboard should not hide itself after lost focus. | 611 // Keyboard should not hide itself after lost focus. |
| 615 EXPECT_TRUE(keyboard_container->IsVisible()); | 612 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 616 EXPECT_FALSE(WillHideKeyboard()); | 613 EXPECT_FALSE(WillHideKeyboard()); |
| 617 } | 614 } |
| 618 | 615 |
| 619 } // namespace keyboard | 616 } // namespace keyboard |
| OLD | NEW |