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

Side by Side Diff: services/ui/ime/ime_unittest.cc

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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 | « services/ui/ime/ime_server_impl.cc ('k') | services/ui/ime/test_ime_driver/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "services/shell/public/cpp/service_context.h" 11 #include "services/service_manager/public/cpp/service_context.h"
12 #include "services/shell/public/cpp/service_test.h" 12 #include "services/service_manager/public/cpp/service_test.h"
13 #include "services/ui/public/interfaces/ime.mojom.h" 13 #include "services/ui/public/interfaces/ime.mojom.h"
14 #include "ui/events/event.h" 14 #include "ui/events/event.h"
15 15
16 class TestTextInputClient : public ui::mojom::TextInputClient { 16 class TestTextInputClient : public ui::mojom::TextInputClient {
17 public: 17 public:
18 explicit TestTextInputClient(ui::mojom::TextInputClientRequest request) 18 explicit TestTextInputClient(ui::mojom::TextInputClientRequest request)
19 : binding_(this, std::move(request)) {} 19 : binding_(this, std::move(request)) {}
20 20
21 ui::mojom::CompositionEventPtr WaitUntilCompositionEvent() { 21 ui::mojom::CompositionEventPtr WaitUntilCompositionEvent() {
22 run_loop_.reset(new base::RunLoop); 22 run_loop_.reset(new base::RunLoop);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 input_method->ProcessKeyEvent(ui::Event::Clone(nonchar_event)); 102 input_method->ProcessKeyEvent(ui::Event::Clone(nonchar_event));
103 103
104 ui::Event* unhandled_event = client.WaitUntilUnhandledEvent(); 104 ui::Event* unhandled_event = client.WaitUntilUnhandledEvent();
105 EXPECT_TRUE(unhandled_event); 105 EXPECT_TRUE(unhandled_event);
106 EXPECT_TRUE(unhandled_event->IsKeyEvent()); 106 EXPECT_TRUE(unhandled_event->IsKeyEvent());
107 EXPECT_FALSE(unhandled_event->AsKeyEvent()->is_char()); 107 EXPECT_FALSE(unhandled_event->AsKeyEvent()->is_char());
108 EXPECT_EQ(ui::ET_KEY_PRESSED, unhandled_event->type()); 108 EXPECT_EQ(ui::ET_KEY_PRESSED, unhandled_event->type());
109 EXPECT_EQ(nonchar_event.key_code(), 109 EXPECT_EQ(nonchar_event.key_code(),
110 unhandled_event->AsKeyEvent()->key_code()); 110 unhandled_event->AsKeyEvent()->key_code());
111 } 111 }
OLDNEW
« no previous file with comments | « services/ui/ime/ime_server_impl.cc ('k') | services/ui/ime/test_ime_driver/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698