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

Side by Side Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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
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
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
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698