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 "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 L10nUtilTest::L10nUtilTest() | 96 L10nUtilTest::L10nUtilTest() |
97 : input_manager_(new MockInputMethodManagerWithInputMethods) { | 97 : input_manager_(new MockInputMethodManagerWithInputMethods) { |
98 } | 98 } |
99 | 99 |
100 L10nUtilTest::~L10nUtilTest() { | 100 L10nUtilTest::~L10nUtilTest() { |
101 } | 101 } |
102 | 102 |
103 void L10nUtilTest::SetUp() { | 103 void L10nUtilTest::SetUp() { |
104 chromeos::input_method::InitializeForTesting(input_manager_); | 104 chromeos::input_method::InitializeForTesting(input_manager_); |
105 input_manager_->SetComponentExtensionIMEManager( | 105 input_manager_->SetComponentExtensionIMEManager( |
106 base::WrapUnique(new ComponentExtensionIMEManager)); | 106 base::MakeUnique<ComponentExtensionIMEManager>()); |
107 MachineStatisticsInitializer::GetInstance(); // Ignore result. | 107 MachineStatisticsInitializer::GetInstance(); // Ignore result. |
108 } | 108 } |
109 | 109 |
110 void L10nUtilTest::TearDown() { | 110 void L10nUtilTest::TearDown() { |
111 chromeos::input_method::Shutdown(); | 111 chromeos::input_method::Shutdown(); |
112 } | 112 } |
113 | 113 |
114 void L10nUtilTest::SetInputMethods1() { | 114 void L10nUtilTest::SetInputMethods1() { |
115 input_manager_->AddInputMethod("xkb:us::eng", "us", "en-US"); | 115 input_manager_->AddInputMethod("xkb:us::eng", "us", "en-US"); |
116 input_manager_->AddInputMethod("xkb:fr::fra", "fr", "fr"); | 116 input_manager_->AddInputMethod("xkb:fr::fra", "fr", "fr"); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 VerifyOnlyUILanguages(*list); | 221 VerifyOnlyUILanguages(*list); |
222 | 222 |
223 ASSERT_LE(3u, list->GetSize()); | 223 ASSERT_LE(3u, list->GetSize()); |
224 | 224 |
225 VerifyLanguageCode(*list, 0, "it"); | 225 VerifyLanguageCode(*list, 0, "it"); |
226 VerifyLanguageCode(*list, 1, "de"); | 226 VerifyLanguageCode(*list, 1, "de"); |
227 VerifyLanguageCode(*list, 2, kMostRelevantLanguagesDivider); | 227 VerifyLanguageCode(*list, 2, kMostRelevantLanguagesDivider); |
228 } | 228 } |
229 | 229 |
230 } // namespace chromeos | 230 } // namespace chromeos |
OLD | NEW |