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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm

Issue 752853005: Remove dependency from infobars component to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
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 #import "base/mac/mac_util.h" 7 #import "base/mac/mac_util.h"
8 #include "base/mac/sdk_forward_declarations.h" 8 #include "base/mac/sdk_forward_declarations.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 InfoBarTipStretchedWhenBookmarkBarStatusChanged) { 596 InfoBarTipStretchedWhenBookmarkBarStatusChanged) {
597 EXPECT_FALSE([controller() isBookmarkBarVisible]); 597 EXPECT_FALSE([controller() isBookmarkBarVisible]);
598 ShowInfoBar(browser()); 598 ShowInfoBar(browser());
599 // The infobar tip is animated during the infobar is being added, wait until 599 // The infobar tip is animated during the infobar is being added, wait until
600 // it completes. 600 // it completes.
601 WaitForTopInfoBarAnimationToFinish(); 601 WaitForTopInfoBarAnimationToFinish();
602 602
603 EXPECT_FALSE([[controller() infoBarContainerController] 603 EXPECT_FALSE([[controller() infoBarContainerController]
604 shouldSuppressTopInfoBarTip]); 604 shouldSuppressTopInfoBarTip]);
605 605
606 NSInteger max_tip_height = infobars::InfoBar::kMaximumArrowTargetHeight + 606 NSInteger max_tip_height = infobars::InfoBar::gMaximumArrowTargetHeight +
607 infobars::InfoBar::kSeparatorLineHeight; 607 infobars::InfoBar::gSeparatorLineHeight;
608 608
609 chrome::ExecuteCommand(browser(), IDC_SHOW_BOOKMARK_BAR); 609 chrome::ExecuteCommand(browser(), IDC_SHOW_BOOKMARK_BAR);
610 WaitForBookmarkBarAnimationToFinish(); 610 WaitForBookmarkBarAnimationToFinish();
611 EXPECT_TRUE([controller() isBookmarkBarVisible]); 611 EXPECT_TRUE([controller() isBookmarkBarVisible]);
612 EXPECT_EQ(std::min(GetExpectedTopInfoBarTipHeight(), max_tip_height), 612 EXPECT_EQ(std::min(GetExpectedTopInfoBarTipHeight(), max_tip_height),
613 [[controller() infoBarContainerController] overlappingTipHeight]); 613 [[controller() infoBarContainerController] overlappingTipHeight]);
614 614
615 chrome::ExecuteCommand(browser(), IDC_SHOW_BOOKMARK_BAR); 615 chrome::ExecuteCommand(browser(), IDC_SHOW_BOOKMARK_BAR);
616 WaitForBookmarkBarAnimationToFinish(); 616 WaitForBookmarkBarAnimationToFinish();
617 EXPECT_FALSE([controller() isBookmarkBarVisible]); 617 EXPECT_FALSE([controller() isBookmarkBarVisible]);
(...skipping 10 matching lines...) Expand all
628 VerifyWindowControlsZOrder(); 628 VerifyWindowControlsZOrder();
629 [controller() removeOverlay]; 629 [controller() removeOverlay];
630 VerifyWindowControlsZOrder(); 630 VerifyWindowControlsZOrder();
631 631
632 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen, 632 // Toggle immersive fullscreen, then verify z order. In immersive fullscreen,
633 // there are no window controls. 633 // there are no window controls.
634 [controller() enterImmersiveFullscreen]; 634 [controller() enterImmersiveFullscreen];
635 [controller() exitImmersiveFullscreen]; 635 [controller() exitImmersiveFullscreen];
636 VerifyWindowControlsZOrder(); 636 VerifyWindowControlsZOrder();
637 } 637 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/infobars/infobar_constants.cc ('k') | chrome/browser/ui/cocoa/infobars/infobar_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698