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

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

Issue 11137002: Re-enable BrowserViewTest.FullScreenClearsFocus on non-Windows platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable windows Created 8 years, 2 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 | « no previous file | no next file » | 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 "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 12
13 using views::FocusManager; 13 using views::FocusManager;
14 using views::View; 14 using views::View;
15 15
16 typedef InProcessBrowserTest BrowserViewTest; 16 typedef InProcessBrowserTest BrowserViewTest;
17 17
18 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) { 18 // Active window and focus testing is not reliable on Windows crbug.com/79493
19 #if defined(OS_WIN)
20 #define MAYBE_FullscreenClearsFocus DISABLED_FullscreenClearsFocus
21 #else
22 #define MAYBE_FullscreenClearsFocus FullscreenClearsFocus
23 #endif
24 IN_PROC_BROWSER_TEST_F(BrowserViewTest, MAYBE_FullscreenClearsFocus) {
19 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); 25 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
20 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); 26 LocationBarView* location_bar_view = browser_view->GetLocationBarView();
21 FocusManager* focus_manager = browser_view->GetFocusManager(); 27 FocusManager* focus_manager = browser_view->GetFocusManager();
22 28
23 // Focus starts in the location bar or one of its children. 29 // Focus starts in the location bar or one of its children.
24 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView())); 30 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView()));
25 31
26 chrome::ToggleFullscreenMode(browser()); 32 chrome::ToggleFullscreenMode(browser());
27 EXPECT_TRUE(browser_view->IsFullscreen()); 33 EXPECT_TRUE(browser_view->IsFullscreen());
28 34
29 // Focus is released from the location bar. 35 // Focus is released from the location bar.
30 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView())); 36 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView()));
31 } 37 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698