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

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

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more includes Created 8 years, 5 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/views/location_bar/location_bar_view.h" 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
8 #include "chrome/test/base/in_process_browser_test.h" 8 #include "chrome/test/base/in_process_browser_test.h"
9 #include "ui/views/focus/focus_manager.h" 9 #include "ui/views/focus/focus_manager.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
11 11
12 using views::FocusManager; 12 using views::FocusManager;
13 using views::View; 13 using views::View;
14 14
15 typedef InProcessBrowserTest BrowserViewTest; 15 typedef InProcessBrowserTest BrowserViewTest;
16 16
17 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) { 17 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) {
18 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); 18 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
19 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); 19 LocationBarView* location_bar_view = browser_view->GetLocationBarView();
20 FocusManager* focus_manager = browser_view->GetFocusManager(); 20 FocusManager* focus_manager = browser_view->GetFocusManager();
21 21
22 // Focus starts in the location bar or one of its children. 22 // Focus starts in the location bar or one of its children.
23 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView())); 23 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView()));
24 24
25 browser()->ToggleFullscreenMode(); 25 browser()->fullscreen_controller()->ToggleFullscreenMode();
26 EXPECT_TRUE(browser_view->IsFullscreen()); 26 EXPECT_TRUE(browser_view->IsFullscreen());
27 27
28 // Focus is released from the location bar. 28 // Focus is released from the location bar.
29 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView())); 29 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView()));
30 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698