OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); | 263 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); |
264 PressEscape(); | 264 PressEscape(); |
265 EXPECT_TRUE(ObserveTabIsInFullscreen(false)); | 265 EXPECT_TRUE(ObserveTabIsInFullscreen(false)); |
266 } | 266 } |
267 | 267 |
268 // This tests that browser UI focus behavior is correct when switching between | 268 // This tests that browser UI focus behavior is correct when switching between |
269 // tabs; particularly, that that focus between the omnibox and tab contents is | 269 // tabs; particularly, that that focus between the omnibox and tab contents is |
270 // stored/restored correctly. Mouse and keyboard events are used to confirm | 270 // stored/restored correctly. Mouse and keyboard events are used to confirm |
271 // that the widget the UI thinks is focused is the one that responds to these | 271 // that the widget the UI thinks is focused is the one that responds to these |
272 // input events. | 272 // input events. |
| 273 // |
| 274 // Flaky, see http://crbug.com/444476 |
273 IN_PROC_BROWSER_TEST_F(FlashFullscreenInteractiveBrowserTest, | 275 IN_PROC_BROWSER_TEST_F(FlashFullscreenInteractiveBrowserTest, |
274 FullscreenWithinTab_FocusWhenSwitchingTabs) { | 276 DISABLED_FullscreenWithinTab_FocusWhenSwitchingTabs) { |
275 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 277 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
276 StartFakingTabCapture(); | 278 StartFakingTabCapture(); |
277 ASSERT_TRUE(LaunchFlashFullscreen()); | 279 ASSERT_TRUE(LaunchFlashFullscreen()); |
278 | 280 |
279 // Upon entering fullscreen, the Flash widget should have focus and be filled | 281 // Upon entering fullscreen, the Flash widget should have focus and be filled |
280 // with green. | 282 // with green. |
281 content::WebContents* const first_tab_contents = GetActiveWebContents(); | 283 content::WebContents* const first_tab_contents = GetActiveWebContents(); |
282 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); | 284 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); |
283 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorGREEN)); | 285 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorGREEN)); |
284 | 286 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorRED)); | 341 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorRED)); |
340 PressSpacebar(); | 342 PressSpacebar(); |
341 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorBLUE)); | 343 ASSERT_TRUE(ObserveFlashFillColor(SK_ColorBLUE)); |
342 | 344 |
343 // Test that the Escape key is handled as an exit fullscreen command while the | 345 // Test that the Escape key is handled as an exit fullscreen command while the |
344 // Flash widget has the focus. | 346 // Flash widget has the focus. |
345 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); | 347 EXPECT_TRUE(ObserveFlashHasFocus(first_tab_contents, true)); |
346 PressEscape(); | 348 PressEscape(); |
347 EXPECT_TRUE(ObserveTabIsInFullscreen(false)); | 349 EXPECT_TRUE(ObserveTabIsInFullscreen(false)); |
348 } | 350 } |
OLD | NEW |