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

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

Issue 20258002: Remove mystery keyboard layout from Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove obsolete test code Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/ime/input_methods.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 EXPECT_TRUE(Contain(*methods.get(), *id_to_find)); 299 EXPECT_TRUE(Contain(*methods.get(), *id_to_find));
300 } 300 }
301 301
302 TEST_F(InputMethodManagerImplTest, TestEnableLayouts) { 302 TEST_F(InputMethodManagerImplTest, TestEnableLayouts) {
303 // Currently 5 keyboard layouts are supported for en-US, and 1 for ja. See 303 // Currently 5 keyboard layouts are supported for en-US, and 1 for ja. See
304 // ibus_input_method.txt. 304 // ibus_input_method.txt.
305 InitComponentExtension(); 305 InitComponentExtension();
306 InitIBusBus(); 306 InitIBusBus();
307 manager_->EnableLayouts("en-US", ""); 307 manager_->EnableLayouts("en-US", "");
308 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods()); 308 EXPECT_EQ(5U, manager_->GetNumActiveInputMethods());
309 { 309 for (size_t i = 0; i < manager_->GetActiveInputMethodIds().size(); ++i)
310 // For http://crbug.com/19655#c11 - (1) 310 LOG(ERROR) << manager_->GetActiveInputMethodIds().at(i);
311 scoped_ptr<InputMethodDescriptors> methods(
312 manager_->GetActiveInputMethods());
313 const InputMethodDescriptor* id_to_find =
314 manager_->GetInputMethodUtil()->GetInputMethodDescriptorFromId(
315 "english-m"); // The "English Mystery" IME.
316 EXPECT_FALSE(Contain(*methods.get(), *id_to_find));
317 }
318 // For http://crbug.com/19655#c11 - (2) 311 // For http://crbug.com/19655#c11 - (2)
319 EXPECT_EQ(0, mock_ibus_daemon_controller_->start_count()); 312 EXPECT_EQ(0, mock_ibus_daemon_controller_->start_count());
320 313
321 // For http://crbug.com/19655#c11 - (5) 314 // For http://crbug.com/19655#c11 - (5)
322 // The hardware keyboard layout "xkb:us::eng" is always active, hence 2U. 315 // The hardware keyboard layout "xkb:us::eng" is always active, hence 2U.
323 manager_->EnableLayouts("ja", ""); // Japanese 316 manager_->EnableLayouts("ja", ""); // Japanese
324 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods()); 317 EXPECT_EQ(2U, manager_->GetNumActiveInputMethods());
325 EXPECT_EQ(0, mock_ibus_daemon_controller_->start_count()); 318 EXPECT_EQ(0, mock_ibus_daemon_controller_->start_count());
326 } 319 }
327 320
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 EXPECT_EQ(fallback_id, manager_->GetCurrentInputMethod().id()); 1336 EXPECT_EQ(fallback_id, manager_->GetCurrentInputMethod().id());
1344 1337
1345 // After component extension IME is initialized, previous specified input 1338 // After component extension IME is initialized, previous specified input
1346 // method should be automatically enabled. 1339 // method should be automatically enabled.
1347 InitComponentExtension(); 1340 InitComponentExtension();
1348 EXPECT_EQ(xkb_id, manager_->GetCurrentInputMethod().id()); 1341 EXPECT_EQ(xkb_id, manager_->GetCurrentInputMethod().id());
1349 } 1342 }
1350 1343
1351 } // namespace input_method 1344 } // namespace input_method
1352 } // namespace chromeos 1345 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/ime/input_methods.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698