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 #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 Loading... |
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 Loading... |
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 } |
OLD | NEW |