| 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
| 9 | 9 |
| 10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 VerifyFullscreenResizeFlagsAfterTransition(); | 684 VerifyFullscreenResizeFlagsAfterTransition(); |
| 685 | 685 |
| 686 // Exit fullscreen and verify the flags. | 686 // Exit fullscreen and verify the flags. |
| 687 ToggleFullscreenAndWaitForNotification(); | 687 ToggleFullscreenAndWaitForNotification(); |
| 688 VerifyFullscreenResizeFlagsAfterTransition(); | 688 VerifyFullscreenResizeFlagsAfterTransition(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 // Tests that the omnibox and tabs are hidden/visible in fullscreen mode. | 691 // Tests that the omnibox and tabs are hidden/visible in fullscreen mode. |
| 692 // Ensure that when the user toggles this setting, the omnibox, tabs and | 692 // Ensure that when the user toggles this setting, the omnibox, tabs and |
| 693 // preferences are updated correctly. | 693 // preferences are updated correctly. |
| 694 // Flakily times out. http://crbug.com/599119 |
| 694 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, | 695 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, |
| 695 FullscreenToolbarIsVisibleAccordingToPrefs) { | 696 DISABLED_FullscreenToolbarIsVisibleAccordingToPrefs) { |
| 696 // This feature is only available on SystemFullscreen. | 697 // This feature is only available on SystemFullscreen. |
| 697 if (!chrome::mac::SupportsSystemFullscreen()) | 698 if (!chrome::mac::SupportsSystemFullscreen()) |
| 698 return; | 699 return; |
| 699 | 700 |
| 700 // Tests that the preference is set to true by default. | 701 // Tests that the preference is set to true by default. |
| 701 PrefService* prefs = browser()->profile()->GetPrefs(); | 702 PrefService* prefs = browser()->profile()->GetPrefs(); |
| 702 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); | 703 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); |
| 703 | 704 |
| 704 // Toggle fullscreen and check if the toolbar is shown. | 705 // Toggle fullscreen and check if the toolbar is shown. |
| 705 ToggleFullscreenAndWaitForNotification(); | 706 ToggleFullscreenAndWaitForNotification(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 716 // Toggle out and back into fullscreen and verify that the toolbar is still | 717 // Toggle out and back into fullscreen and verify that the toolbar is still |
| 717 // hidden. | 718 // hidden. |
| 718 ToggleFullscreenAndWaitForNotification(); | 719 ToggleFullscreenAndWaitForNotification(); |
| 719 ToggleFullscreenAndWaitForNotification(); | 720 ToggleFullscreenAndWaitForNotification(); |
| 720 [[controller() presentationModeController] setMenuBarRevealProgress:0.0]; | 721 [[controller() presentationModeController] setMenuBarRevealProgress:0.0]; |
| 721 VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); | 722 VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); |
| 722 | 723 |
| 723 chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); | 724 chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); |
| 724 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); | 725 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); |
| 725 } | 726 } |
| OLD | NEW |