Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1264)

Side by Side Diff: ui/views/ime/input_method_bridge_unittest.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/input_method_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/aura/window.h"
6 #include "ui/base/ime/dummy_input_method_delegate.h"
7 #include "ui/base/ime/input_method_minimal.h"
8 #include "ui/base/ime/text_input_client.h"
9 #include "ui/views/ime/input_method.h"
10 #include "ui/views/test/views_test_base.h"
11 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
12 #include "ui/views/widget/native_widget_aura.h"
13 #include "ui/views/widget/widget.h"
14
15 namespace views {
16
17 typedef ViewsTestBase InputMethodBridgeTest;
18
19 TEST_F(InputMethodBridgeTest, DestructTest) {
20 ui::internal::DummyInputMethodDelegate input_method_delegate;
21 ui::InputMethodMinimal input_method(&input_method_delegate);
22
23 Widget* toplevel = new Widget;
24 Widget::InitParams toplevel_params =
25 CreateParams(Widget::InitParams::TYPE_WINDOW);
26 // |child| owns |native_widget|.
27 toplevel_params.native_widget = new DesktopNativeWidgetAura(toplevel);
28 toplevel->Init(toplevel_params);
29
30 Widget* child = new Widget;
31 Widget::InitParams child_params =
32 CreateParams(Widget::InitParams::TYPE_POPUP);
33 child_params.parent = toplevel->GetNativeView();
34 // |child| owns |native_widget|.
35 child_params.native_widget = new NativeWidgetAura(child);
36 child->Init(child_params);
37
38 child->GetInputMethod()->OnFocus();
39
40 toplevel->CloseNow();
41 }
42
43 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/ime/input_method_bridge.cc ('k') | ui/views/ime/input_method_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698