summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_tests.gypi
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 01:50:03 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-15 01:50:03 +0000
commit0b6da80b684557f26cab8986fa5e4995731160fc (patch)
tree19ff1ee381976ef4c8af7a02ea1c18d7df98a72b /chrome/chrome_tests.gypi
parenta3cd44aefa9d4091d287a62130180ba75a87bbd6 (diff)
downloadchromium_src-0b6da80b684557f26cab8986fa5e4995731160fc.zip
chromium_src-0b6da80b684557f26cab8986fa5e4995731160fc.tar.gz
chromium_src-0b6da80b684557f26cab8986fa5e4995731160fc.tar.bz2
Share the same keyboard layout among all windows.
- Call SetKeyboardLayoutPerWindow(false) in LanguageMenuButton::LanguageMenuButton(). - Mock Keyboard APIs so LanguageMenuButton::LanguageMenuButton() can call the function even in browser_tests. In browser_tests, code like "if (CrosLibrary::Get()->EnsureLoaded()) SetKeyboardLayoutPerWindow(false);" does not work since the EnsureLoaded() function is replaced so it always returns true without loading libcros.so (i.e. the function pointer |SetKeyboardLayoutPerWindow| is NULL). We could fix this by either of the following: 1) Add NULL check: if (CrosLibrary::Get()->EnsureLoaded() && (SetKeyboardLayoutPerWindow != NULL)) SetKeyboardLayoutPerWindow(false); 2) Mock keyboard APIs and just call: CrosLibrary::Get()->GetKeyboardLibrary()->SetKeyboardLayoutPerWindow(false); I'd choose 2), since 1) looks a bit error-prone and inconsistent with other libcros libraries (e.g. power, language, ...) FYI, we can use the new cros/keyboard_library.h interface to implement the "swap ctrl/caps" feature in a clean way. BUG=chromium-os:2433 TEST=manually Review URL: http://codereview.chromium.org/2781006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_tests.gypi')
-rwxr-xr-xchrome/chrome_tests.gypi2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 8b06e38..4103883 100755
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1457,6 +1457,8 @@
'browser/chromeos/cros/cros_in_process_browser_test.h',
'browser/chromeos/cros/mock_cros_library.h',
'browser/chromeos/cros/mock_cryptohome_library.h',
+ 'browser/chromeos/cros/mock_keyboard_library.h',
+ 'browser/chromeos/cros/mock_language_library.h',
'browser/chromeos/cros/mock_mount_library.cc',
'browser/chromeos/cros/mock_mount_library.h',
'browser/chromeos/cros/mock_network_library.h',