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/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 EXPECT_EQ(NSMinY(alertFrame), NSMinY(bookmarkBarFrame)); | 567 EXPECT_EQ(NSMinY(alertFrame), NSMinY(bookmarkBarFrame)); |
568 | 568 |
569 // Make sure the profile does not have the bookmark visible so that | 569 // Make sure the profile does not have the bookmark visible so that |
570 // we'll create the shortcut window without the bookmark bar. | 570 // we'll create the shortcut window without the bookmark bar. |
571 browser()->window()->ToggleBookmarkBar(); | 571 browser()->window()->ToggleBookmarkBar(); |
572 // Open application mode window. | 572 // Open application mode window. |
573 gfx::Rect initial_bounds(0, 0, 400, 400); | 573 gfx::Rect initial_bounds(0, 0, 400, 400); |
574 chrome::OpenAppShortcutWindow( | 574 chrome::OpenAppShortcutWindow( |
575 browser()->profile(), GURL("about:blank"), initial_bounds); | 575 browser()->profile(), GURL("about:blank"), initial_bounds); |
576 Browser* popup_browser = BrowserList::GetInstance( | 576 Browser* popup_browser = BrowserList::GetInstance( |
577 chrome::HOST_DESKTOP_TYPE_NATIVE)->GetLastActive(); | 577 chrome::GetActiveDesktop())->GetLastActive(); |
578 NSWindow* popupWindow = popup_browser->window()->GetNativeWindow(); | 578 NSWindow* popupWindow = popup_browser->window()->GetNativeWindow(); |
579 BrowserWindowController* popupController = | 579 BrowserWindowController* popupController = |
580 [BrowserWindowController browserWindowControllerForWindow:popupWindow]; | 580 [BrowserWindowController browserWindowControllerForWindow:popupWindow]; |
581 ASSERT_TRUE([popupController isKindOfClass:[BrowserWindowController class]]); | 581 ASSERT_TRUE([popupController isKindOfClass:[BrowserWindowController class]]); |
582 EXPECT_FALSE([popupController isTabbedWindow]); | 582 EXPECT_FALSE([popupController isTabbedWindow]); |
583 EXPECT_FALSE([popupController hasTabStrip]); | 583 EXPECT_FALSE([popupController hasTabStrip]); |
584 EXPECT_TRUE([popupController hasTitleBar]); | 584 EXPECT_TRUE([popupController hasTitleBar]); |
585 EXPECT_FALSE([popupController isBookmarkBarVisible]); | 585 EXPECT_FALSE([popupController isBookmarkBarVisible]); |
586 EXPECT_FALSE([popupController hasToolbar]); | 586 EXPECT_FALSE([popupController hasToolbar]); |
587 | 587 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); | 655 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); |
656 | 656 |
657 scoped_nsobject<HistoryOverlayController> overlay( | 657 scoped_nsobject<HistoryOverlayController> overlay( |
658 [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]); | 658 [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]); |
659 [overlay showPanelForView:web_contents_view->GetNativeView()]; | 659 [overlay showPanelForView:web_contents_view->GetNativeView()]; |
660 EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews()); | 660 EXPECT_TRUE(web_contents_view->GetAllowOverlappingViews()); |
661 | 661 |
662 overlay.reset(); | 662 overlay.reset(); |
663 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); | 663 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); |
664 } | 664 } |
OLD | NEW |