| OLD | NEW |
| 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/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 8 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 9 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
| 10 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
| 11 | 12 |
| 12 using views::FocusManager; | 13 using views::FocusManager; |
| 13 using views::View; | 14 using views::View; |
| 14 | 15 |
| 15 typedef InProcessBrowserTest BrowserViewTest; | 16 typedef InProcessBrowserTest BrowserViewTest; |
| 16 | 17 |
| 17 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) { | 18 IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) { |
| 18 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); | 19 BrowserView* browser_view = static_cast<BrowserView*>(browser()->window()); |
| 19 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); | 20 LocationBarView* location_bar_view = browser_view->GetLocationBarView(); |
| 20 FocusManager* focus_manager = browser_view->GetFocusManager(); | 21 FocusManager* focus_manager = browser_view->GetFocusManager(); |
| 21 | 22 |
| 22 // Focus starts in the location bar or one of its children. | 23 // Focus starts in the location bar or one of its children. |
| 23 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView())); | 24 EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView())); |
| 24 | 25 |
| 25 browser()->ToggleFullscreenMode(); | 26 chrome::ToggleFullscreenMode(browser()); |
| 26 EXPECT_TRUE(browser_view->IsFullscreen()); | 27 EXPECT_TRUE(browser_view->IsFullscreen()); |
| 27 | 28 |
| 28 // Focus is released from the location bar. | 29 // Focus is released from the location bar. |
| 29 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView())); | 30 EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView())); |
| 30 } | 31 } |
| OLD | NEW |