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

Unified Diff: chrome/browser/ui/fullscreen/fullscreen_controller_test.cc

Issue 10919113: Move fullscreen_controller browser tests to interactive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cross platform safe include of mac specific header Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/fullscreen/fullscreen_controller_test.cc
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_test.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_test.cc
index 4ad110f1361e73ad3a2cb9bd639acb29f5d9265e..cdc463193466ed6b24626b999016381baf526599 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller_test.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller_test.cc
@@ -23,34 +23,6 @@ void FullscreenControllerTest::SetUpCommandLine(CommandLine* command_line) {
command_line->AppendSwitch(switches::kEnablePointerLock);
}
-void FullscreenControllerTest::ToggleTabFullscreen(bool enter_fullscreen) {
- ToggleTabFullscreen_Internal(enter_fullscreen, true);
-}
-
-// |ToggleTabFullscreen| should not need to tolerate the transition failing.
-// Most fullscreen tests run sharded in fullscreen_controller_browsertest.cc
-// and some flakiness has occurred when calling |ToggleTabFullscreen|, so that
-// method has been made robust by retrying if the transition fails.
-// The root cause of that flakiness should still be tracked down, see
-// http://crbug.com/133831. In the mean time, this method
-// allows a fullscreen_controller_interactive_browsertest.cc test to verify
-// that when running serially there is no flakiness in the transition.
-void FullscreenControllerTest::ToggleTabFullscreenNoRetries(
- bool enter_fullscreen) {
- ToggleTabFullscreen_Internal(enter_fullscreen, false);
-}
-
-void FullscreenControllerTest::ToggleBrowserFullscreen(bool enter_fullscreen) {
- ASSERT_EQ(browser()->window()->IsFullscreen(), !enter_fullscreen);
- FullscreenNotificationObserver fullscreen_observer;
-
- chrome::ToggleFullscreenMode(browser());
-
- fullscreen_observer.Wait();
- ASSERT_EQ(browser()->window()->IsFullscreen(), enter_fullscreen);
- ASSERT_EQ(IsFullscreenForBrowser(), enter_fullscreen);
-}
-
void FullscreenControllerTest::RequestToLockMouse(
bool user_gesture,
bool last_unlocked_by_target) {
@@ -150,24 +122,3 @@ void FullscreenControllerTest::Reload() {
observer.Wait();
}
-void FullscreenControllerTest::ToggleTabFullscreen_Internal(
- bool enter_fullscreen, bool retry_until_success) {
- WebContents* tab = chrome::GetActiveWebContents(browser());
- if (IsFullscreenForBrowser()) {
- // Changing tab fullscreen state will not actually change the window
- // when browser fullscreen is in effect.
- browser()->ToggleFullscreenModeForTab(tab, enter_fullscreen);
- } else { // Not in browser fullscreen, expect window to actually change.
- ASSERT_NE(browser()->window()->IsFullscreen(), enter_fullscreen);
- do {
- FullscreenNotificationObserver fullscreen_observer;
- browser()->ToggleFullscreenModeForTab(tab, enter_fullscreen);
- fullscreen_observer.Wait();
- // Repeat ToggleFullscreenModeForTab until the correct state is entered.
- // This addresses flakiness on test bots running many fullscreen
- // tests in parallel.
- } while (retry_until_success &&
- browser()->window()->IsFullscreen() != enter_fullscreen);
- ASSERT_EQ(browser()->window()->IsFullscreen(), enter_fullscreen);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698