OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "ui/events/event_constants.h" | 6 #include "ui/events/event_constants.h" |
7 #include "ui/events/keycodes/dom3/dom_code.h" | 7 #include "ui/events/keycodes/dom3/dom_code.h" |
8 #include "ui/events/keycodes/dom3/dom_key.h" | 8 #include "ui/events/keycodes/dom3/dom_key.h" |
9 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 9 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
10 #include "ui/events/ozone/layout/layout_util.h" | 10 #include "ui/events/ozone/layout/layout_util.h" |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 /* 46 */ {"tr", "tr", ""}, | 800 /* 46 */ {"tr", "tr", ""}, |
801 /* 47 */ {"ua", "ua", ""}, | 801 /* 47 */ {"ua", "ua", ""}, |
802 /* 48 */ {"by", "by", ""}, | 802 /* 48 */ {"by", "by", ""}, |
803 /* 49 */ {"am", "am", ""}, | 803 /* 49 */ {"am", "am", ""}, |
804 /* 50 */ {"ge", "ge", ""}, | 804 /* 50 */ {"ge", "ge", ""}, |
805 /* 51 */ {"mn", "mn", ""}, | 805 /* 51 */ {"mn", "mn", ""}, |
806 /* 52 */ {"ie", "ie", ""}}; | 806 /* 52 */ {"ie", "ie", ""}}; |
807 for (size_t i = 0; i < arraysize(kVkeyTestCase); ++i) { | 807 for (size_t i = 0; i < arraysize(kVkeyTestCase); ++i) { |
808 SCOPED_TRACE(i); | 808 SCOPED_TRACE(i); |
809 const VkTestXkbKeyboardLayoutEngine::RuleNames* e = &kVkeyTestCase[i]; | 809 const VkTestXkbKeyboardLayoutEngine::RuleNames* e = &kVkeyTestCase[i]; |
810 scoped_ptr<xkb_rule_names> names = | 810 std::string layout_id; |
811 layout_engine_->GetXkbRuleNames(e->layout_name); | 811 std::string layout_variant; |
812 EXPECT_EQ(names.get()->layout, e->layout); | 812 XkbKeyboardLayoutEngine::ParseLayoutName(e->layout_name, &layout_id, |
813 EXPECT_EQ(names.get()->variant, e->variant); | 813 &layout_variant); |
| 814 EXPECT_EQ(layout_id, e->layout); |
| 815 EXPECT_EQ(layout_variant, e->variant); |
814 } | 816 } |
815 } | 817 } |
816 | 818 |
817 } // namespace ui | 819 } // namespace ui |
OLD | NEW |