diff options
author | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-17 04:35:40 +0000 |
---|---|---|
committer | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-17 04:35:40 +0000 |
commit | 3f1084c1212f8f035cd9a4452f4f8357be7ef71a (patch) | |
tree | a724194e5c9cf2e6afef3dd735c1ac27c8614906 /chrome/browser/chromeos | |
parent | 296dcc0bdc1cba1c7b661b0ac01797d172f49c91 (diff) | |
download | chromium_src-3f1084c1212f8f035cd9a4452f4f8357be7ef71a.zip chromium_src-3f1084c1212f8f035cd9a4452f4f8357be7ef71a.tar.gz chromium_src-3f1084c1212f8f035cd9a4452f4f8357be7ef71a.tar.bz2 |
Fix unit_tests on Aura Chrome OS.
BUG=None
TEST=None
TBR=zork
Review URL: https://chromiumcodereview.appspot.com/9418036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/input_method/xkeyboard_unittest.cc | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc b/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc index f4c26ac..c891151 100644 --- a/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc +++ b/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc @@ -149,8 +149,11 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameBasic) { "us!", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); EXPECT_STREQ("", xkey_->CreateFullXkbLayoutName( "us; /bin/sh", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); - EXPECT_STREQ("ab-c_12+chromeos(disabled_disabled_disabled),us", - xkey_->CreateFullXkbLayoutName( + EXPECT_STREQ("ab-c_12+chromeos(disabled_disabled_disabled)" +#if !defined(USE_AURA) + ",us" +#endif + , xkey_->CreateFullXkbLayoutName( "ab-c_12", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); @@ -177,11 +180,15 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameBasic) { xkey_->CreateFullXkbLayoutName( "us(dvorak)", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); - EXPECT_STREQ("jp+chromeos(disabled_disabled_disabled),us", - xkey_->CreateFullXkbLayoutName( + EXPECT_STREQ("jp+chromeos(disabled_disabled_disabled)" +#if !defined(USE_AURA) + ",us" +#endif + , xkey_->CreateFullXkbLayoutName( "jp", // does not use AltGr, therefore no _keepralt. GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); +#if !defined(USE_AURA) // When the layout name is not "us", the second layout should be added. EXPECT_EQ(std::string::npos, xkey_->CreateFullXkbLayoutName( "us", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us")); @@ -191,6 +198,7 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameBasic) { "gb(extd)", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us")); EXPECT_NE(std::string::npos, xkey_->CreateFullXkbLayoutName( "jp", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us")); +#endif } TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepCapsLock) { @@ -199,15 +207,20 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepCapsLock) { "us(colemak)", // The 1st kVoidKey should be ignored. GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); - EXPECT_STREQ("de(neo)+" - "chromeos(search_leftcontrol_leftcontrol_keepralt),us", - xkey_->CreateFullXkbLayoutName( + EXPECT_STREQ("de(neo)+chromeos(search_leftcontrol_leftcontrol_keepralt)" +#if !defined(USE_AURA) + ",us" +#endif + , xkey_->CreateFullXkbLayoutName( // The 1st kLeftControlKey should be ignored. "de(neo)", GetMap(kLeftControlKey, kLeftControlKey, kLeftControlKey)).c_str()); - EXPECT_STREQ("gb(extd)+chromeos(disabled_disabled_disabled_keepralt),us", - xkey_->CreateFullXkbLayoutName( + EXPECT_STREQ("gb(extd)+chromeos(disabled_disabled_disabled_keepralt)" +#if !defined(USE_AURA) + ",us" +#endif + , xkey_->CreateFullXkbLayoutName( "gb(extd)", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); } @@ -217,8 +230,11 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepAlt) { xkey_->CreateFullXkbLayoutName( "us(intl)", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str()); EXPECT_STREQ("kr(kr104)+" - "chromeos(leftcontrol_leftcontrol_leftcontrol_keepralt),us", - xkey_->CreateFullXkbLayoutName( + "chromeos(leftcontrol_leftcontrol_leftcontrol_keepralt)" +#if !defined(USE_AURA) + ",us" +#endif + , xkey_->CreateFullXkbLayoutName( "kr(kr104)", GetMap(kLeftControlKey, kLeftControlKey, kLeftControlKey)).c_str()); |