| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/arc/ime/arc_ime_service.h" | 5 #include "components/arc/ime/arc_ime_service.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "components/arc/test/fake_arc_bridge_service.h" | 14 #include "components/arc/arc_bridge_service.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "ui/aura/test/test_window_delegate.h" | 16 #include "ui/aura/test/test_window_delegate.h" |
| 17 #include "ui/aura/test/test_windows.h" | 17 #include "ui/aura/test/test_windows.h" |
| 18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 19 #include "ui/base/ime/composition_text.h" | 19 #include "ui/base/ime/composition_text.h" |
| 20 #include "ui/base/ime/dummy_input_method.h" | 20 #include "ui/base/ime/dummy_input_method.h" |
| 21 #include "ui/events/event.h" | 21 #include "ui/events/event.h" |
| 22 #include "ui/events/keycodes/keyboard_codes.h" | 22 #include "ui/events/keycodes/keyboard_codes.h" |
| 23 | 23 |
| 24 namespace arc { | 24 namespace arc { |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 EXPECT_EQ(instance_.get(), fake_input_method_->GetTextInputClient()); | 257 EXPECT_EQ(instance_.get(), fake_input_method_->GetTextInputClient()); |
| 258 EXPECT_EQ(2, fake_input_method_->count_set_focused_text_input_client()); | 258 EXPECT_EQ(2, fake_input_method_->count_set_focused_text_input_client()); |
| 259 | 259 |
| 260 // Focus is moving out. | 260 // Focus is moving out. |
| 261 instance_->OnWindowFocused(nullptr, arc_win_.get()); | 261 instance_->OnWindowFocused(nullptr, arc_win_.get()); |
| 262 EXPECT_EQ(nullptr, fake_input_method_->GetTextInputClient()); | 262 EXPECT_EQ(nullptr, fake_input_method_->GetTextInputClient()); |
| 263 EXPECT_EQ(2, fake_input_method_->count_set_focused_text_input_client()); | 263 EXPECT_EQ(2, fake_input_method_->count_set_focused_text_input_client()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace arc | 266 } // namespace arc |
| OLD | NEW |