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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "chrome/browser/content_settings/host_content_settings_map.h" | 6 #include "chrome/browser/content_settings/host_content_settings_map.h" |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 SendEscapeToFullscreenController(); | 498 SendEscapeToFullscreenController(); |
499 fullscreen_observer.Wait(); | 499 fullscreen_observer.Wait(); |
500 } | 500 } |
501 ASSERT_FALSE(IsMouseLocked()); | 501 ASSERT_FALSE(IsMouseLocked()); |
502 ASSERT_FALSE(IsFullscreenForTabOrPending()); | 502 ASSERT_FALSE(IsFullscreenForTabOrPending()); |
503 ASSERT_FALSE(IsFullscreenPermissionRequested()); | 503 ASSERT_FALSE(IsFullscreenPermissionRequested()); |
504 ASSERT_FALSE(IsMouseLockPermissionRequested()); | 504 ASSERT_FALSE(IsMouseLockPermissionRequested()); |
505 } | 505 } |
506 | 506 |
507 // Tests mouse lock then fullscreen. | 507 // Tests mouse lock then fullscreen. |
| 508 // Test is flaky: http://crbug.com/146006 |
508 IN_PROC_BROWSER_TEST_F(FullscreenControllerInteractiveTest, | 509 IN_PROC_BROWSER_TEST_F(FullscreenControllerInteractiveTest, |
509 MouseLockThenFullscreen) { | 510 DISABLED_MouseLockThenFullscreen) { |
510 ASSERT_TRUE(test_server()->Start()); | 511 ASSERT_TRUE(test_server()->Start()); |
511 ui_test_utils::NavigateToURL(browser(), | 512 ui_test_utils::NavigateToURL(browser(), |
512 test_server()->GetURL(kFullscreenMouseLockHTML)); | 513 test_server()->GetURL(kFullscreenMouseLockHTML)); |
513 | 514 |
514 ASSERT_FALSE(IsFullscreenBubbleDisplayed()); | 515 ASSERT_FALSE(IsFullscreenBubbleDisplayed()); |
515 | 516 |
516 // Lock the mouse without a user gesture, expect no response. | 517 // Lock the mouse without a user gesture, expect no response. |
517 ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait( | 518 ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait( |
518 browser(), ui::VKEY_D, false, false, false, false, | 519 browser(), ui::VKEY_D, false, false, false, false, |
519 chrome::NOTIFICATION_MOUSE_LOCK_CHANGED, | 520 chrome::NOTIFICATION_MOUSE_LOCK_CHANGED, |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 | 869 |
869 GURL url = test_server()->GetURL("simple.html"); | 870 GURL url = test_server()->GetURL("simple.html"); |
870 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED); | 871 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED); |
871 | 872 |
872 // Validate that going fullscreen for a URL defaults to asking permision. | 873 // Validate that going fullscreen for a URL defaults to asking permision. |
873 ASSERT_FALSE(IsFullscreenPermissionRequested()); | 874 ASSERT_FALSE(IsFullscreenPermissionRequested()); |
874 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); | 875 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); |
875 ASSERT_TRUE(IsFullscreenPermissionRequested()); | 876 ASSERT_TRUE(IsFullscreenPermissionRequested()); |
876 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); | 877 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); |
877 } | 878 } |
OLD | NEW |