blob: a2957feb10ebc132a64f8670b92928f6cd69a456 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/view.h"
using views::FocusManager;
using views::View;
typedef InProcessBrowserTest BrowserViewTest;
IN_PROC_BROWSER_TEST_F(BrowserViewTest, DISABLED_FullscreenClearsFocus) {
BrowserView* browser_view = static_cast<BrowserView*>(browser()->window());
LocationBarView* location_bar_view = browser_view->GetLocationBarView();
FocusManager* focus_manager = browser_view->GetFocusManager();
// Focus starts in the location bar or one of its children.
EXPECT_TRUE(location_bar_view->Contains(focus_manager->GetFocusedView()));
browser()->ToggleFullscreenMode();
EXPECT_TRUE(browser_view->IsFullscreen());
// Focus is released from the location bar.
EXPECT_FALSE(location_bar_view->Contains(focus_manager->GetFocusedView()));
}
|