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

Side by Side Diff: ui/events/ozone/layout/keyboard_layout_engine_unittest.cc

Issue 2645703005: Add a KeyboardLayoutEngine::SetCurrentLayoutFromBuffer implementation (Closed)
Patch Set: for landing Created 3 years, 11 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 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
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
OLDNEW
« no previous file with comments | « ui/events/ozone/layout/keyboard_layout_engine.h ('k') | ui/events/ozone/layout/no/no_keyboard_layout_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698