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

Side by Side Diff: apps/moterm/key_util_unittest.cc

Issue 1398973004: Move //mojo/services/X/public/... to //mojo/services/X/... (part 2). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_1
Patch Set: add missing copyright notices Created 5 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 | « apps/moterm/key_util.cc ('k') | apps/moterm/moterm_view.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "apps/moterm/key_util.h" 5 #include "apps/moterm/key_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "mojo/services/input_events/public/interfaces/input_events.mojom.h" 9 #include "mojo/services/input_events/interfaces/input_events.mojom.h"
10 #include "mojo/services/input_events/public/interfaces/input_key_codes.mojom.h" 10 #include "mojo/services/input_events/interfaces/input_key_codes.mojom.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace { 13 namespace {
14 14
15 // Makes a key event. Note that this cheats in a number of respects. 15 // Makes a key event. Note that this cheats in a number of respects.
16 // TODO(vtl): Add a |flags| argument when |GetInputSequenceForKeyPressedEvent()| 16 // TODO(vtl): Add a |flags| argument when |GetInputSequenceForKeyPressedEvent()|
17 // actually uses it. 17 // actually uses it.
18 mojo::EventPtr MakeKeyEvent(bool is_char, 18 mojo::EventPtr MakeKeyEvent(bool is_char,
19 char character, 19 char character,
20 mojo::KeyboardCode windows_key_code) { 20 mojo::KeyboardCode windows_key_code) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 *MakeKeyEvent(true, 0, mojo::KeyboardCode::HOME), true)); 90 *MakeKeyEvent(true, 0, mojo::KeyboardCode::HOME), true));
91 // As should the arroy keys. 91 // As should the arroy keys.
92 EXPECT_EQ("\x1bOC", 92 EXPECT_EQ("\x1bOC",
93 GetInputSequenceForKeyPressedEvent( 93 GetInputSequenceForKeyPressedEvent(
94 *MakeKeyEvent(true, 0, mojo::KeyboardCode::RIGHT), true)); 94 *MakeKeyEvent(true, 0, mojo::KeyboardCode::RIGHT), true));
95 // TODO(vtl): Test this more thoroughly. Also other keypad keys (once that's 95 // TODO(vtl): Test this more thoroughly. Also other keypad keys (once that's
96 // implemented). 96 // implemented).
97 } 97 }
98 98
99 } // namespace 99 } // namespace
OLDNEW
« no previous file with comments | « apps/moterm/key_util.cc ('k') | apps/moterm/moterm_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698