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

Side by Side Diff: ash/shelf/shelf_widget_unittest.cc

Issue 23874013: Remove old activation code and disable-focus-controller flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_button.h" 8 #include "ash/launcher/launcher_button.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/launcher/launcher_view.h" 10 #include "ash/launcher/launcher_view.h"
(...skipping 21 matching lines...) Expand all
32 internal::ShelfLayoutManager* GetShelfLayoutManager() { 32 internal::ShelfLayoutManager* GetShelfLayoutManager() {
33 return GetShelfWidget()->shelf_layout_manager(); 33 return GetShelfWidget()->shelf_layout_manager();
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 typedef test::AshTestBase ShelfWidgetTest; 38 typedef test::AshTestBase ShelfWidgetTest;
39 39
40 // Launcher can't be activated on mouse click, but it is activable from 40 // Launcher can't be activated on mouse click, but it is activable from
41 // the focus cycler or as fallback. 41 // the focus cycler or as fallback.
42 TEST_F(ShelfWidgetTest, ActivateAsFallback) { 42 // TODO(mtomasz): make this test work with the FocusController.
43 // TODO(mtomasz): make this test work with the FocusController. 43 // crbug.com/285364.
James Cook 2013/09/04 22:53:50 Thanks for filing a bug for this!
44 if (views::corewm::UseFocusController()) 44 TEST_F(ShelfWidgetTest, DISABLED_ActivateAsFallback) {
45 return;
46
47 Launcher* launcher = Launcher::ForPrimaryDisplay(); 45 Launcher* launcher = Launcher::ForPrimaryDisplay();
48 ShelfWidget* shelf_widget = launcher->shelf_widget(); 46 ShelfWidget* shelf_widget = launcher->shelf_widget();
49 EXPECT_FALSE(shelf_widget->CanActivate()); 47 EXPECT_FALSE(shelf_widget->CanActivate());
50 48
51 shelf_widget->WillActivateAsFallback(); 49 shelf_widget->WillActivateAsFallback();
52 EXPECT_TRUE(shelf_widget->CanActivate()); 50 EXPECT_TRUE(shelf_widget->CanActivate());
53 51
54 wm::ActivateWindow(shelf_widget->GetNativeWindow()); 52 wm::ActivateWindow(shelf_widget->GetNativeWindow());
55 EXPECT_FALSE(shelf_widget->CanActivate()); 53 EXPECT_FALSE(shelf_widget->CanActivate());
56 } 54 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 const int status_width = 184 const int status_width =
187 shelf->status_area_widget()->GetWindowBoundsInScreen().width(); 185 shelf->status_area_widget()->GetWindowBoundsInScreen().width();
188 EXPECT_GT(status_width, 0); 186 EXPECT_GT(status_width, 0);
189 EXPECT_EQ(status_width, 187 EXPECT_EQ(status_width,
190 shelf->GetContentsView()->width() - 188 shelf->GetContentsView()->width() -
191 launcher->GetLauncherViewForTest()->width()); 189 launcher->GetLauncherViewForTest()->width());
192 } 190 }
193 #endif 191 #endif
194 192
195 } // namespace ash 193 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698