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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_browsertest.cc

Issue 10905080: Exempt status bubble windows from status bar darkening (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "chrome/browser/ui/browser_commands.h" 7 #include "chrome/browser/ui/browser_commands.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "ui/views/focus/focus_manager.h" 10 #include "ui/views/focus/focus_manager.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 #include "ui/views/widget/widget.h"
13
14 #if defined(USE_ASH)
15 #include "chrome/browser/ui/views/status_bubble_views.h"
16 #include "ui/aura/window.h"
17 #include "ash/wm/property_util.h"
18 #endif
12 19
13 using views::FocusManager; 20 using views::FocusManager;
14 using views::View; 21 using views::View;
15 22
16 typedef InProcessBrowserTest BrowserViewTest; 23 typedef InProcessBrowserTest BrowserViewTest;
17 24
18 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) { 25 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) {
19 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); 26 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
20 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); 27 LocationBarView* location_bar_view = browser_view->GetLocationBarView();
21 FocusManager* focus_manager = browser_view->GetFocusManager(); 28 FocusManager* focus_manager = browser_view->GetFocusManager();
22 29
23 // Focus starts in the location bar or one of its children. 30 // Focus starts in the location bar or one of its children.
24 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView())); 31 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView()));
25 32
26 chrome::ToggleFullscreenMode(browser()); 33 chrome::ToggleFullscreenMode(browser());
27 EXPECT_TRUE(browser_view->IsFullscreen()); 34 EXPECT_TRUE(browser_view->IsFullscreen());
28 35
29 // Focus is released from the location bar. 36 // Focus is released from the location bar.
30 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView())); 37 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView()));
31 } 38 }
39
40 #if defined(USE_ASH)
41 // Confirm that status bubble views are not used when determining if the shelf
42 // should be darkened.
43 IN_PROC_BROWSER_TEST_F(BrowserViewTest, StatusBubble) {
sky 2012/09/04 20:16:05 Is it possible to make this a unit test? By that I
44 StatusBubbleViews* status_bubble = static_cast<StatusBubbleViews*>(
45 browser()->window()->GetStatusBubble());;
46
47 aura::Window* status_window =
48 status_bubble->GetPopupForTest()->GetNativeWindow();
49 EXPECT_TRUE(ash::GetIgnoredByShelf(status_window));
50 }
51 #endif
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager_unittest.cc ('k') | chrome/browser/ui/views/status_bubble_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698