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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_util_unittest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/input_method_util.h" 5 #include "chrome/browser/chromeos/input_method/input_method_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory>
9 #include <string> 10 #include <string>
10 11
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "ui/base/ime/chromeos/extension_ime_util.h" 16 #include "ui/base/ime/chromeos/extension_ime_util.h"
17 #include "ui/base/ime/chromeos/fake_input_method_delegate.h" 17 #include "ui/base/ime/chromeos/fake_input_method_delegate.h"
18 #include "ui/base/ime/chromeos/input_method_manager.h" 18 #include "ui/base/ime/chromeos/input_method_manager.h"
19 #include "ui/base/ime/chromeos/input_method_whitelist.h" 19 #include "ui/base/ime/chromeos/input_method_whitelist.h"
20 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 21
22 using base::ASCIIToUTF16; 22 using base::ASCIIToUTF16;
23 23
24 namespace chromeos { 24 namespace chromeos {
25 25
26 namespace input_method { 26 namespace input_method {
27 27
28 namespace { 28 namespace {
29 29
30 const char pinyin_ime_id[] = "zh-t-i0-pinyin"; 30 const char pinyin_ime_id[] = "zh-t-i0-pinyin";
31 const char zhuyin_ime_id[] = "zh-hant-t-i0-und"; 31 const char zhuyin_ime_id[] = "zh-hant-t-i0-und";
32 32
33 class TestableInputMethodUtil : public InputMethodUtil { 33 class TestableInputMethodUtil : public InputMethodUtil {
34 public: 34 public:
35 explicit TestableInputMethodUtil(InputMethodDelegate* delegate, 35 explicit TestableInputMethodUtil(
36 scoped_ptr<InputMethodDescriptors> methods) 36 InputMethodDelegate* delegate,
37 std::unique_ptr<InputMethodDescriptors> methods)
37 : InputMethodUtil(delegate) { 38 : InputMethodUtil(delegate) {
38 ResetInputMethods(*methods); 39 ResetInputMethods(*methods);
39 } 40 }
40 // Change access rights. 41 // Change access rights.
41 using InputMethodUtil::GetInputMethodIdsFromLanguageCodeInternal; 42 using InputMethodUtil::GetInputMethodIdsFromLanguageCodeInternal;
42 using InputMethodUtil::GetKeyboardLayoutName; 43 using InputMethodUtil::GetKeyboardLayoutName;
43 }; 44 };
44 45
45 } // namespace 46 } // namespace
46 47
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 EXPECT_EQ("xkb:us::eng", extension_ime_util::GetComponentIDByInputMethodID( 528 EXPECT_EQ("xkb:us::eng", extension_ime_util::GetComponentIDByInputMethodID(
528 input_method_ids[0])); 529 input_method_ids[0]));
529 EXPECT_EQ("xkb:ru::rus", extension_ime_util::GetComponentIDByInputMethodID( 530 EXPECT_EQ("xkb:ru::rus", extension_ime_util::GetComponentIDByInputMethodID(
530 input_method_ids[1])); 531 input_method_ids[1]));
531 EXPECT_EQ("xkb:us::eng", extension_ime_util::GetComponentIDByInputMethodID( 532 EXPECT_EQ("xkb:us::eng", extension_ime_util::GetComponentIDByInputMethodID(
532 login_input_method_ids[0])); 533 login_input_method_ids[0]));
533 } 534 }
534 535
535 } // namespace input_method 536 } // namespace input_method
536 } // namespace chromeos 537 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698