| Index: chrome/browser/chromeos/input_method/xkeyboard.cc
|
| diff --git a/chrome/browser/chromeos/input_method/xkeyboard.cc b/chrome/browser/chromeos/input_method/xkeyboard.cc
|
| index fadb3f04822546cce7479775185495c27b15dccd..6ae6472cdc83ac820b954acf6b9cba5011f05c9a 100644
|
| --- a/chrome/browser/chromeos/input_method/xkeyboard.cc
|
| +++ b/chrome/browser/chromeos/input_method/xkeyboard.cc
|
| @@ -283,14 +283,9 @@ unsigned int XKeyboardImpl::GetNumLockMask() {
|
|
|
| void XKeyboardImpl::GetLockedModifiers(bool* out_caps_lock_enabled,
|
| bool* out_num_lock_enabled) {
|
| - // For now, don't call CHECK() here to make
|
| - // TabRestoreServiceTest.DontRestorePrintPreviewTab test happy.
|
| - // TODO(yusukes): Fix the test, then fix the if(!BrowserThread...) line below.
|
| - // CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| -
|
| - if (!BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
| - (out_num_lock_enabled && !num_lock_mask_)) {
|
| - VLOG(1) << "Cannot get locked modifiers. Num Lock mask unknown.";
|
| + // The method might be called by browser_tests running on Linux.
|
| + if (!is_running_on_chrome_os_ || (out_num_lock_enabled && !num_lock_mask_)) {
|
| + VLOG(1) << "Cannot get locked modifiers.";
|
| if (out_caps_lock_enabled) {
|
| *out_caps_lock_enabled = false;
|
| }
|
| @@ -300,6 +295,7 @@ void XKeyboardImpl::GetLockedModifiers(bool* out_caps_lock_enabled,
|
| return;
|
| }
|
|
|
| + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| XkbStateRec status;
|
| XkbGetState(ui::GetXDisplay(), XkbUseCoreKbd, &status);
|
| if (out_caps_lock_enabled) {
|
|
|