| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE { return false; } | 151 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE { return false; } |
| 152 virtual bool GetTextFromRange(const gfx::Range& range, | 152 virtual bool GetTextFromRange(const gfx::Range& range, |
| 153 base::string16* text) const OVERRIDE { | 153 base::string16* text) const OVERRIDE { |
| 154 return false; | 154 return false; |
| 155 } | 155 } |
| 156 virtual void OnInputMethodChanged() OVERRIDE {} | 156 virtual void OnInputMethodChanged() OVERRIDE {} |
| 157 virtual bool ChangeTextDirectionAndLayoutAlignment( | 157 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 158 base::i18n::TextDirection direction) OVERRIDE { return false; } | 158 base::i18n::TextDirection direction) OVERRIDE { return false; } |
| 159 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE {} | 159 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE {} |
| 160 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {} | 160 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE {} |
| 161 virtual void OnCandidateWindowShow() OVERRIDE {} |
| 162 virtual void OnCandidateWindowUpdate() OVERRIDE {} |
| 163 virtual void OnCandidateWindowHide() OVERRIDE {} |
| 161 | 164 |
| 162 ui::TextInputType type_; | 165 ui::TextInputType type_; |
| 163 | 166 |
| 164 DISALLOW_COPY_AND_ASSIGN(TestTextInputClient); | 167 DISALLOW_COPY_AND_ASSIGN(TestTextInputClient); |
| 165 }; | 168 }; |
| 166 | 169 |
| 167 class KeyboardContainerObserver : public aura::WindowObserver { | 170 class KeyboardContainerObserver : public aura::WindowObserver { |
| 168 public: | 171 public: |
| 169 explicit KeyboardContainerObserver(aura::Window* window) : window_(window) { | 172 explicit KeyboardContainerObserver(aura::Window* window) : window_(window) { |
| 170 window_->AddObserver(this); | 173 window_->AddObserver(this); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 363 |
| 361 EXPECT_TRUE(keyboard_container->IsVisible()); | 364 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 362 | 365 |
| 363 input_method->SetFocusedTextInputClient(&no_input_client); | 366 input_method->SetFocusedTextInputClient(&no_input_client); |
| 364 // Keyboard should not hide itself after lost focus. | 367 // Keyboard should not hide itself after lost focus. |
| 365 EXPECT_TRUE(keyboard_container->IsVisible()); | 368 EXPECT_TRUE(keyboard_container->IsVisible()); |
| 366 EXPECT_FALSE(WillHideKeyboard()); | 369 EXPECT_FALSE(WillHideKeyboard()); |
| 367 } | 370 } |
| 368 | 371 |
| 369 } // namespace keyboard | 372 } // namespace keyboard |
| OLD | NEW |