OLD | NEW |
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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "ui/events/event.h" | 8 #include "ui/events/event.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 } // anonymous namespace | 216 } // anonymous namespace |
217 | 217 |
218 TEST(LayoutEngineTest, Lookup) { | 218 TEST(LayoutEngineTest, Lookup) { |
219 // Test StubKeyboardLayoutEngine | 219 // Test StubKeyboardLayoutEngine |
220 TestLookup("StubKeyboardLayoutEngine", new StubKeyboardLayoutEngine()); | 220 TestLookup("StubKeyboardLayoutEngine", new StubKeyboardLayoutEngine()); |
221 | 221 |
222 XkbEvdevCodes xkb_evdev_code_converter; | 222 XkbEvdevCodes xkb_evdev_code_converter; |
223 XkbKeyboardLayoutEngine* xkb_engine = | 223 XkbKeyboardLayoutEngine* xkb_engine = |
224 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter); | 224 new XkbKeyboardLayoutEngine(xkb_evdev_code_converter); |
225 xkb_engine->SetKeymapFromStringForTest(kUsLayoutXkbKeymap); | 225 xkb_engine->SetCurrentLayoutFromBuffer(kUsLayoutXkbKeymap, |
| 226 strlen(kUsLayoutXkbKeymap)); |
226 TestLookup("XkbKeyboardLayoutEngine", xkb_engine); | 227 TestLookup("XkbKeyboardLayoutEngine", xkb_engine); |
227 } | 228 } |
228 | 229 |
229 } // namespace ui | 230 } // namespace ui |
OLD | NEW |