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

Side by Side Diff: ash/focus_cycler_unittest.cc

Issue 10514008: Add WebNotificationTray (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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_strings.grd ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/focus_cycler.h" 5 #include "ash/focus_cycler.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 18 matching lines...) Expand all
29 29
30 internal::StatusAreaWidgetDelegate* GetStatusAreaWidgetDelegate( 30 internal::StatusAreaWidgetDelegate* GetStatusAreaWidgetDelegate(
31 views::Widget* widget) { 31 views::Widget* widget) {
32 return static_cast<internal::StatusAreaWidgetDelegate*>( 32 return static_cast<internal::StatusAreaWidgetDelegate*>(
33 widget->GetContentsView()); 33 widget->GetContentsView());
34 } 34 }
35 35
36 SystemTray* CreateSystemTray() { 36 SystemTray* CreateSystemTray() {
37 SystemTray* tray = new SystemTray; 37 SystemTray* tray = new SystemTray;
38 internal::StatusAreaWidget* widget = new internal::StatusAreaWidget; 38 internal::StatusAreaWidget* widget = new internal::StatusAreaWidget;
39 widget->AddTray(tray); 39 widget->AddSystemTray(tray, NULL);
40 widget->Show(); 40 widget->Show();
41 return tray; 41 return tray;
42 } 42 }
43 43
44 } // namespace 44 } // namespace
45 45
46 typedef AshTestBase FocusCyclerTest; 46 typedef AshTestBase FocusCyclerTest;
47 47
48 TEST_F(FocusCyclerTest, CycleFocusBrowserOnly) { 48 TEST_F(FocusCyclerTest, CycleFocusBrowserOnly) {
49 scoped_ptr<FocusCycler> focus_cycler(new FocusCycler()); 49 scoped_ptr<FocusCycler> focus_cycler(new FocusCycler());
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 focus_cycler->RotateFocus(FocusCycler::BACKWARD); 231 focus_cycler->RotateFocus(FocusCycler::BACKWARD);
232 EXPECT_TRUE(tray->GetWidget()->IsActive()); 232 EXPECT_TRUE(tray->GetWidget()->IsActive());
233 233
234 // Cycle focus to the browser 234 // Cycle focus to the browser
235 focus_cycler->RotateFocus(FocusCycler::BACKWARD); 235 focus_cycler->RotateFocus(FocusCycler::BACKWARD);
236 EXPECT_TRUE(wm::IsActiveWindow(window0.get())); 236 EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
237 } 237 }
238 238
239 } // namespace test 239 } // namespace test
240 } // namespace ash 240 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_strings.grd ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698