| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } | 647 } |
| 648 | 648 |
| 649 // Verify that AllowOverlappingViews is set while the history overlay is | 649 // Verify that AllowOverlappingViews is set while the history overlay is |
| 650 // visible. | 650 // visible. |
| 651 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, | 651 IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, |
| 652 AllowOverlappingViewsHistoryOverlay) { | 652 AllowOverlappingViewsHistoryOverlay) { |
| 653 content::WebContentsView* web_contents_view = | 653 content::WebContentsView* web_contents_view = |
| 654 browser()->tab_strip_model()->GetActiveWebContents()->GetView(); | 654 browser()->tab_strip_model()->GetActiveWebContents()->GetView(); |
| 655 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); | 655 EXPECT_FALSE(web_contents_view->GetAllowOverlappingViews()); |
| 656 | 656 |
| 657 scoped_nsobject<HistoryOverlayController> overlay( | 657 base::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 |