OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser_commands.h" | 7 #include "chrome/browser/ui/browser_commands.h" |
8 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 8 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" | 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" |
10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 const ZoomBubbleView* zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest(); | 31 const ZoomBubbleView* zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest(); |
32 EXPECT_TRUE(zoom_bubble->GetAnchorView()); | 32 EXPECT_TRUE(zoom_bubble->GetAnchorView()); |
33 | 33 |
34 // Entering fullscreen should close the bubble. (We enter into tab fullscreen | 34 // Entering fullscreen should close the bubble. (We enter into tab fullscreen |
35 // here because tab fullscreen is non-immersive even on Chrome OS.) | 35 // here because tab fullscreen is non-immersive even on Chrome OS.) |
36 { | 36 { |
37 // NOTIFICATION_FULLSCREEN_CHANGED is sent asynchronously. Wait for the | 37 // NOTIFICATION_FULLSCREEN_CHANGED is sent asynchronously. Wait for the |
38 // notification before testing the zoom bubble visibility. | 38 // notification before testing the zoom bubble visibility. |
39 scoped_ptr<FullscreenNotificationObserver> waiter( | 39 scoped_ptr<FullscreenNotificationObserver> waiter( |
40 new FullscreenNotificationObserver()); | 40 new FullscreenNotificationObserver()); |
41 browser()->fullscreen_controller()->EnterFullscreenModeForTab( | 41 browser() |
42 web_contents, GURL()); | 42 ->exclusive_access_manager() |
| 43 ->fullscreen_controller() |
| 44 ->EnterFullscreenModeForTab(web_contents, GURL()); |
43 waiter->Wait(); | 45 waiter->Wait(); |
44 } | 46 } |
45 ASSERT_FALSE(browser_view->immersive_mode_controller()->IsEnabled()); | 47 ASSERT_FALSE(browser_view->immersive_mode_controller()->IsEnabled()); |
46 EXPECT_FALSE(ZoomBubbleView::IsShowing()); | 48 EXPECT_FALSE(ZoomBubbleView::IsShowing()); |
47 | 49 |
48 // The bubble should not be anchored when it is shown in non-immersive | 50 // The bubble should not be anchored when it is shown in non-immersive |
49 // fullscreen. | 51 // fullscreen. |
50 ZoomBubbleView::ShowBubble(web_contents, true); | 52 ZoomBubbleView::ShowBubble(web_contents, true); |
51 ASSERT_TRUE(ZoomBubbleView::IsShowing()); | 53 ASSERT_TRUE(ZoomBubbleView::IsShowing()); |
52 zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest(); | 54 zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 118 |
117 // Exit fullscreen before ending the test for the sake of sanity. | 119 // Exit fullscreen before ending the test for the sake of sanity. |
118 { | 120 { |
119 scoped_ptr<FullscreenNotificationObserver> waiter( | 121 scoped_ptr<FullscreenNotificationObserver> waiter( |
120 new FullscreenNotificationObserver()); | 122 new FullscreenNotificationObserver()); |
121 chrome::ToggleFullscreenMode(browser()); | 123 chrome::ToggleFullscreenMode(browser()); |
122 waiter->Wait(); | 124 waiter->Wait(); |
123 } | 125 } |
124 } | 126 } |
125 #endif // OS_CHROMEOS | 127 #endif // OS_CHROMEOS |
OLD | NEW |