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

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_controller_test.cc

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.h" 5 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 WebContents* tab = chrome::GetActiveWebContents(browser()); 58 WebContents* tab = chrome::GetActiveWebContents(browser());
59 browser()->RequestToLockMouse(tab, user_gesture, 59 browser()->RequestToLockMouse(tab, user_gesture,
60 last_unlocked_by_target); 60 last_unlocked_by_target);
61 } 61 }
62 62
63 void FullscreenControllerTest::LostMouseLock() { 63 void FullscreenControllerTest::LostMouseLock() {
64 browser()->LostMouseLock(); 64 browser()->LostMouseLock();
65 } 65 }
66 66
67 bool FullscreenControllerTest::SendEscapeToFullscreenController() { 67 bool FullscreenControllerTest::SendEscapeToFullscreenController() {
68 return browser()->fullscreen_controller_->HandleUserPressedEscape(); 68 return browser()->fullscreen_controller_->HandleUserPressedEscape();
scheib 2012/07/03 17:08:49 Modify to use new accessor. Is it possible to remo
tfarina 2012/07/03 18:51:22 Done.
69 } 69 }
70 70
71 bool FullscreenControllerTest::IsFullscreenForBrowser() { 71 bool FullscreenControllerTest::IsFullscreenForBrowser() {
72 return browser()->fullscreen_controller_->IsFullscreenForBrowser(); 72 return browser()->fullscreen_controller_->IsFullscreenForBrowser();
73 } 73 }
74 74
75 bool FullscreenControllerTest::IsFullscreenForTabOrPending() { 75 bool FullscreenControllerTest::IsFullscreenForTabOrPending() {
76 return browser()->IsFullscreenForTabOrPending(); 76 return browser()->IsFullscreenForTabOrPending();
77 } 77 }
78 78
(...skipping 27 matching lines...) Expand all
106 bool FullscreenControllerTest::IsFullscreenBubbleDisplayingButtons() { 106 bool FullscreenControllerTest::IsFullscreenBubbleDisplayingButtons() {
107 FullscreenExitBubbleType type = 107 FullscreenExitBubbleType type =
108 browser()->fullscreen_controller_->GetFullscreenExitBubbleType(); 108 browser()->fullscreen_controller_->GetFullscreenExitBubbleType();
109 return fullscreen_bubble::ShowButtonsForType(type); 109 return fullscreen_bubble::ShowButtonsForType(type);
110 } 110 }
111 111
112 void FullscreenControllerTest::AcceptCurrentFullscreenOrMouseLockRequest() { 112 void FullscreenControllerTest::AcceptCurrentFullscreenOrMouseLockRequest() {
113 WebContents* fullscreen_tab = chrome::GetActiveWebContents(browser()); 113 WebContents* fullscreen_tab = chrome::GetActiveWebContents(browser());
114 FullscreenExitBubbleType type = 114 FullscreenExitBubbleType type =
115 browser()->fullscreen_controller_->GetFullscreenExitBubbleType(); 115 browser()->fullscreen_controller_->GetFullscreenExitBubbleType();
116 browser()->OnAcceptFullscreenPermission(fullscreen_tab->GetURL(), type); 116 browser()->fullscreen_controller_->OnAcceptFullscreenPermission(
117 fullscreen_tab->GetURL(), type);
117 } 118 }
118 119
119 void FullscreenControllerTest::DenyCurrentFullscreenOrMouseLockRequest() { 120 void FullscreenControllerTest::DenyCurrentFullscreenOrMouseLockRequest() {
120 FullscreenExitBubbleType type = 121 FullscreenExitBubbleType type =
121 browser()->fullscreen_controller_->GetFullscreenExitBubbleType(); 122 browser()->fullscreen_controller_->GetFullscreenExitBubbleType();
122 browser()->OnDenyFullscreenPermission(type); 123 browser()->fullscreen_controller_->OnDenyFullscreenPermission(type);
123 } 124 }
124 125
125 void FullscreenControllerTest::AddTabAtIndexAndWait(int index, const GURL& url, 126 void FullscreenControllerTest::AddTabAtIndexAndWait(int index, const GURL& url,
126 content::PageTransition transition) { 127 content::PageTransition transition) {
127 content::TestNavigationObserver observer( 128 content::TestNavigationObserver observer(
128 content::NotificationService::AllSources(), NULL, 1); 129 content::NotificationService::AllSources(), NULL, 1);
129 130
130 AddTabAtIndex(index, url, transition); 131 AddTabAtIndex(index, url, transition);
131 132
132 observer.Wait(); 133 observer.Wait();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 browser()->ToggleFullscreenModeForTab(tab, enter_fullscreen); 165 browser()->ToggleFullscreenModeForTab(tab, enter_fullscreen);
165 fullscreen_observer.Wait(); 166 fullscreen_observer.Wait();
166 // Repeat ToggleFullscreenModeForTab until the correct state is entered. 167 // Repeat ToggleFullscreenModeForTab until the correct state is entered.
167 // This addresses flakiness on test bots running many fullscreen 168 // This addresses flakiness on test bots running many fullscreen
168 // tests in parallel. 169 // tests in parallel.
169 } while (retry_until_success && 170 } while (retry_until_success &&
170 browser()->window()->IsFullscreen() != enter_fullscreen); 171 browser()->window()->IsFullscreen() != enter_fullscreen);
171 ASSERT_EQ(browser()->window()->IsFullscreen(), enter_fullscreen); 172 ASSERT_EQ(browser()->window()->IsFullscreen(), enter_fullscreen);
172 } 173 }
173 } 174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698