summaryrefslogtreecommitdiffstats
path: root/ash/focus_cycler_unittest.cc
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 04:41:29 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 04:41:29 +0000
commit1813439565ec0222546b3e2fbaaf5d67ba639bfd (patch)
treea230f833bcf3e995f247d8d4bd05a93097855ac0 /ash/focus_cycler_unittest.cc
parent199603d5ba6253054400fc277a81afeb98955900 (diff)
downloadchromium_src-1813439565ec0222546b3e2fbaaf5d67ba639bfd.zip
chromium_src-1813439565ec0222546b3e2fbaaf5d67ba639bfd.tar.gz
chromium_src-1813439565ec0222546b3e2fbaaf5d67ba639bfd.tar.bz2
Activate the status area only when it's focused using the keyboard.
ash/status_area/status_area_view.cc: chrome/browser/chromeos/status/status_area_view.cc: Override views::WidgetDelegate::CanActivate. Return false unless the area is focused using the keyboard. ash/system/tray/system_tray.cc: Handle a mouse event correctly. ash/wm/activation_controller.cc: Change the order of kWindowContainerIds[] so that a browser window gets focused when a window in SettingBubbleContainer is closed. This fix is similar to http://crrev.com/122459 (by sky). BUG=115815 TEST=aura_shell_unittests Review URL: http://codereview.chromium.org/9570013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/focus_cycler_unittest.cc')
-rw-r--r--ash/focus_cycler_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 39c53a1..15d4357 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -7,6 +7,7 @@
#include "ash/launcher/launcher.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
+#include "ash/status_area/status_area_view.h"
#include "ash/wm/window_util.h"
#include "ash/test/ash_test_base.h"
#include "ash/shell_factory.h"
@@ -47,6 +48,8 @@ TEST_F(FocusCyclerTest, CycleFocusForward) {
views::Widget* status_widget = internal::CreateStatusArea(NULL);
ASSERT_TRUE(status_widget);
focus_cycler->AddWidget(status_widget);
+ static_cast<internal::StatusAreaView*>(status_widget->GetContentsView())->
+ SetFocusCyclerForTesting(focus_cycler.get());
// Add a mock button to the status area.
status_widget->GetContentsView()->AddChildView(
@@ -88,6 +91,8 @@ TEST_F(FocusCyclerTest, CycleFocusBackward) {
views::Widget* status_widget = internal::CreateStatusArea(NULL);
ASSERT_TRUE(status_widget);
focus_cycler->AddWidget(status_widget);
+ static_cast<internal::StatusAreaView*>(status_widget->GetContentsView())->
+ SetFocusCyclerForTesting(focus_cycler.get());
// Add a mock button to the status area.
status_widget->GetContentsView()->AddChildView(