| 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 "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" | 5 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // anonymous namespace | 146 } // anonymous namespace |
| 147 | 147 |
| 148 class XkbLayoutEngineVkTest : public testing::Test { | 148 class XkbLayoutEngineVkTest : public testing::Test { |
| 149 public: | 149 public: |
| 150 XkbLayoutEngineVkTest() {} | 150 XkbLayoutEngineVkTest() {} |
| 151 ~XkbLayoutEngineVkTest() override {} | 151 ~XkbLayoutEngineVkTest() override {} |
| 152 | 152 |
| 153 void SetUp() override { | 153 void SetUp() override { |
| 154 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(base::WrapUnique( | 154 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
| 155 new VkTestXkbKeyboardLayoutEngine(keycode_converter_))); | 155 base::MakeUnique<VkTestXkbKeyboardLayoutEngine>(keycode_converter_)); |
| 156 layout_engine_ = static_cast<VkTestXkbKeyboardLayoutEngine*>( | 156 layout_engine_ = static_cast<VkTestXkbKeyboardLayoutEngine*>( |
| 157 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()); | 157 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()); |
| 158 } | 158 } |
| 159 void TearDown() override {} | 159 void TearDown() override {} |
| 160 | 160 |
| 161 protected: | 161 protected: |
| 162 VkTestXkbKeyCodeConverter keycode_converter_; | 162 VkTestXkbKeyCodeConverter keycode_converter_; |
| 163 VkTestXkbKeyboardLayoutEngine* layout_engine_; | 163 VkTestXkbKeyboardLayoutEngine* layout_engine_; |
| 164 }; | 164 }; |
| 165 | 165 |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 std::string layout_id; | 895 std::string layout_id; |
| 896 std::string layout_variant; | 896 std::string layout_variant; |
| 897 XkbKeyboardLayoutEngine::ParseLayoutName(e->layout_name, &layout_id, | 897 XkbKeyboardLayoutEngine::ParseLayoutName(e->layout_name, &layout_id, |
| 898 &layout_variant); | 898 &layout_variant); |
| 899 EXPECT_EQ(layout_id, e->layout); | 899 EXPECT_EQ(layout_id, e->layout); |
| 900 EXPECT_EQ(layout_variant, e->variant); | 900 EXPECT_EQ(layout_variant, e->variant); |
| 901 } | 901 } |
| 902 } | 902 } |
| 903 | 903 |
| 904 } // namespace ui | 904 } // namespace ui |
| OLD | NEW |