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

Side by Side Diff: ui/views/mus/views_mus_test_suite.cc

Issue 2831583005: Enable Config::MUS to use classic IME instead of servicified IME. (Closed)
Patch Set: Fix compile errors in non ChromeOS. Created 3 years, 8 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
OLDNEW
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 "ui/views/mus/views_mus_test_suite.h" 5 #include "ui/views/mus/views_mus_test_suite.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 NativeWidget* native_widget = 104 NativeWidget* native_widget =
105 mus_client_->CreateNativeWidget(init_params, delegate); 105 mus_client_->CreateNativeWidget(init_params, delegate);
106 if (!native_widget) 106 if (!native_widget)
107 return nullptr; 107 return nullptr;
108 108
109 // Disable sending KeyEvents to IME as tests aren't set up to wait for an 109 // Disable sending KeyEvents to IME as tests aren't set up to wait for an
110 // ack (and tests run concurrently). 110 // ack (and tests run concurrently).
111 aura::WindowTreeHostMus* window_tree_host_mus = 111 aura::WindowTreeHostMus* window_tree_host_mus =
112 static_cast<aura::WindowTreeHostMus*>( 112 static_cast<aura::WindowTreeHostMus*>(
113 static_cast<DesktopNativeWidgetAura*>(native_widget)->host()); 113 static_cast<DesktopNativeWidgetAura*>(native_widget)->host());
114 aura::InputMethodMusTestApi::Disable(window_tree_host_mus->input_method()); 114 aura::InputMethodMus* input_method_mus =
115 window_tree_host_mus->input_method_mus_for_testing();
116 DCHECK(input_method_mus);
117 aura::InputMethodMusTestApi::Disable(input_method_mus);
115 return native_widget; 118 return native_widget;
116 } 119 }
117 120
118 std::unique_ptr<MusClient> mus_client_; 121 std::unique_ptr<MusClient> mus_client_;
119 ui::FakeContextFactory context_factory_; 122 ui::FakeContextFactory context_factory_;
120 123
121 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus); 124 DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus);
122 }; 125 };
123 126
124 std::unique_ptr<PlatformTestHelper> CreatePlatformTestHelper( 127 std::unique_ptr<PlatformTestHelper> CreatePlatformTestHelper(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 266
264 void ViewsMusTestSuite::InitializeEnv() { 267 void ViewsMusTestSuite::InitializeEnv() {
265 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); 268 env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS);
266 } 269 }
267 270
268 void ViewsMusTestSuite::DestroyEnv() { 271 void ViewsMusTestSuite::DestroyEnv() {
269 env_.reset(); 272 env_.reset();
270 } 273 }
271 274
272 } // namespace views 275 } // namespace views
OLDNEW
« ui/aura/mus/window_tree_host_mus.cc ('K') | « ui/aura/test/mus/input_method_mus_test_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698