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

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc

Issue 789533002: Fullscreen: make fullscreen requests come from RenderFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make try happy Created 5 years, 11 months 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 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
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()->ToggleFullscreenModeForTab( 41 browser()->fullscreen_controller()->EnterFullscreenModeForTab(
42 web_contents, true); 42 web_contents, GURL());
43 waiter->Wait(); 43 waiter->Wait();
44 } 44 }
45 ASSERT_FALSE(browser_view->immersive_mode_controller()->IsEnabled()); 45 ASSERT_FALSE(browser_view->immersive_mode_controller()->IsEnabled());
46 EXPECT_FALSE(ZoomBubbleView::IsShowing()); 46 EXPECT_FALSE(ZoomBubbleView::IsShowing());
47 47
48 // The bubble should not be anchored when it is shown in non-immersive 48 // The bubble should not be anchored when it is shown in non-immersive
49 // fullscreen. 49 // fullscreen.
50 ZoomBubbleView::ShowBubble(web_contents, true); 50 ZoomBubbleView::ShowBubble(web_contents, true);
51 ASSERT_TRUE(ZoomBubbleView::IsShowing()); 51 ASSERT_TRUE(ZoomBubbleView::IsShowing());
52 zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest(); 52 zoom_bubble = ZoomBubbleView::GetZoomBubbleForTest();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Exit fullscreen before ending the test for the sake of sanity. 117 // Exit fullscreen before ending the test for the sake of sanity.
118 { 118 {
119 scoped_ptr<FullscreenNotificationObserver> waiter( 119 scoped_ptr<FullscreenNotificationObserver> waiter(
120 new FullscreenNotificationObserver()); 120 new FullscreenNotificationObserver());
121 chrome::ToggleFullscreenMode(browser()); 121 chrome::ToggleFullscreenMode(browser());
122 waiter->Wait(); 122 waiter->Wait();
123 } 123 }
124 } 124 }
125 #endif // OS_CHROMEOS 125 #endif // OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698