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

Unified Diff: chrome/browser/ui/ash/caps_lock_handler.cc

Issue 10882071: Fixes for bunch of browser tests that are trying to load content from file: schema. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/task_manager/task_manager_notification_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/caps_lock_handler.cc
diff --git a/chrome/browser/ui/ash/caps_lock_handler.cc b/chrome/browser/ui/ash/caps_lock_handler.cc
index a4c81b4d359dc6e4eeb5ebaca6b171a4ee500b73..a5f0db6bc12af8cc60d5d7f86bf1c8db6cb07c83 100644
--- a/chrome/browser/ui/ash/caps_lock_handler.cc
+++ b/chrome/browser/ui/ash/caps_lock_handler.cc
@@ -10,6 +10,8 @@
// TODO(yusukes): Support Ash on Windows.
#if defined(OS_CHROMEOS)
#include "base/chromeos/chromeos_version.h"
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/browser/chromeos/input_method/xkeyboard.h"
#endif
@@ -20,9 +22,10 @@ CapsLockHandler::CapsLockHandler(chromeos::input_method::XKeyboard* xkeyboard)
caps_lock_is_on_(xkeyboard_->CapsLockIsEnabled()) {
chromeos::SystemKeyEventListener* system_event_listener =
chromeos::SystemKeyEventListener::GetInstance();
- // SystemKeyEventListener should be instantiated when we're running on Chrome
- // OS.
- DCHECK(!is_running_on_chromeos_ || system_event_listener);
+ // SystemKeyEventListener should be instantiated when we're running production
+ // code on Chrome OS.
+ DCHECK(!is_running_on_chromeos_ || system_event_listener ||
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType));
if (system_event_listener)
system_event_listener->AddCapsLockObserver(this);
}
« no previous file with comments | « chrome/browser/task_manager/task_manager_notification_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698