Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3173)

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm

Issue 2467833003: [Mac] Move the fullscreen toolbar style to FullscreenToolbarController (Closed)
Patch Set: fix for rsesek Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
index 8686570a5a34b85b56026b0f9b074b61dfbae1b8..5f77cd40cc7102f4653ae90abc40621950b5222f 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -192,34 +192,18 @@ class ViewExposedChecker {
// True if revealToolbarForTabStripChanges was called.
@property(nonatomic, assign) BOOL isRevealingToolbarForTabstrip;
-// Initializer.
-- (id)initWithBrowserController:(BrowserWindowController*)controller;
-
// Sets isRevealingToolbarForTabstrip back to false.
- (void)resetToolbarFlag;
// Overridden to set isRevealingToolbarForTabstrip to true when it's called.
- (void)revealToolbarForTabStripChanges;
-// Overridden so that we don't have to deal with the DCHECKs when the
-// BWC exits fullscreen.
-- (void)exitFullscreenMode;
-
@end
@implementation MockFullscreenToolbarController
@synthesize isRevealingToolbarForTabstrip = isRevealingToolbarForTabstrip_;
-- (id)initWithBrowserController:(BrowserWindowController*)controller {
- if ((self = [super initWithBrowserController:controller
- style:FullscreenSlidingStyle::
- OMNIBOX_TABS_HIDDEN])) {
- }
-
- return self;
-}
-
- (void)resetToolbarFlag {
isRevealingToolbarForTabstrip_ = NO;
}
@@ -228,9 +212,6 @@ class ViewExposedChecker {
isRevealingToolbarForTabstrip_ = YES;
}
-- (void)exitFullscreenMode {
-}
-
@end
@interface InfoBarContainerController(TestingAPI)
@@ -371,12 +352,12 @@ class BrowserWindowControllerTest : public InProcessBrowserTest {
runner->Run();
}
- void VerifyFullscreenToolbarVisibility(FullscreenSlidingStyle style) {
- EXPECT_EQ([[controller() fullscreenToolbarController] slidingStyle], style);
+ void VerifyFullscreenToolbarVisibility(FullscreenToolbarStyle style) {
+ EXPECT_EQ([[controller() fullscreenToolbarController] toolbarStyle], style);
NSRect toolbarFrame = [[[controller() toolbarController] view] frame];
NSRect screenFrame = [[[controller() window] screen] frame];
- if (style == FullscreenSlidingStyle::OMNIBOX_TABS_PRESENT)
+ if (style == FullscreenToolbarStyle::TOOLBAR_PRESENT)
EXPECT_LE(NSMaxY(toolbarFrame), NSMaxY(screenFrame));
else
EXPECT_GE(NSMinY(toolbarFrame), NSMaxY(screenFrame));
@@ -757,24 +738,21 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest,
// Toggle fullscreen and check if the toolbar is shown.
ToggleFullscreenAndWaitForNotification();
- VerifyFullscreenToolbarVisibility(
- FullscreenSlidingStyle::OMNIBOX_TABS_PRESENT);
+ VerifyFullscreenToolbarVisibility(FullscreenToolbarStyle::TOOLBAR_PRESENT);
// Toggle the visibility of the fullscreen toolbar. Verify that the toolbar
// is hidden and the preference is correctly updated.
[[controller() fullscreenToolbarController] setMenuBarRevealProgress:0.0];
chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR);
EXPECT_FALSE(prefs->GetBoolean(prefs::kShowFullscreenToolbar));
- VerifyFullscreenToolbarVisibility(
- FullscreenSlidingStyle::OMNIBOX_TABS_HIDDEN);
+ VerifyFullscreenToolbarVisibility(FullscreenToolbarStyle::TOOLBAR_HIDDEN);
// Toggle out and back into fullscreen and verify that the toolbar is still
// hidden.
ToggleFullscreenAndWaitForNotification();
ToggleFullscreenAndWaitForNotification();
[[controller() fullscreenToolbarController] setMenuBarRevealProgress:0.0];
- VerifyFullscreenToolbarVisibility(
- FullscreenSlidingStyle::OMNIBOX_TABS_HIDDEN);
+ VerifyFullscreenToolbarVisibility(FullscreenToolbarStyle::TOOLBAR_HIDDEN);
chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR);
EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar));
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698