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

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

Issue 11896104: Refactor FullscreenController removing TogglePresentationMode & adding ToggleFullscreenWithChrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm compile fix Created 7 years, 10 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 "build/build_config.h" 5 #include "build/build_config.h"
6 #include "chrome/browser/content_settings/host_content_settings_map.h" 6 #include "chrome/browser/content_settings/host_content_settings_map.h"
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.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_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome()); 372 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome());
373 browser()->ToggleFullscreenModeForTab(tab, true); 373 browser()->ToggleFullscreenModeForTab(tab, true);
374 fullscreen_observer.Wait(); 374 fullscreen_observer.Wait();
375 EXPECT_TRUE(browser()->window()->IsFullscreen()); 375 EXPECT_TRUE(browser()->window()->IsFullscreen());
376 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome()); 376 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome());
377 EXPECT_TRUE(browser()->window()->IsFullscreenWithoutChrome()); 377 EXPECT_TRUE(browser()->window()->IsFullscreenWithoutChrome());
378 } 378 }
379 379
380 { 380 {
381 FullscreenNotificationObserver fullscreen_observer; 381 FullscreenNotificationObserver fullscreen_observer;
382 browser()->TogglePresentationMode(); 382 chrome::ToggleFullscreenMode(browser());
383 fullscreen_observer.Wait(); 383 fullscreen_observer.Wait();
384 EXPECT_FALSE(browser()->window()->IsFullscreen()); 384 EXPECT_FALSE(browser()->window()->IsFullscreen());
385 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome()); 385 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome());
386 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome()); 386 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome());
387 } 387 }
388 388
389 if (base::mac::IsOSLionOrLater()) { 389 if (base::mac::IsOSLionOrLater()) {
390 // Test that tab fullscreen mode doesn't make presentation mode the default 390 // Test that tab fullscreen mode doesn't make presentation mode the default
391 // on Lion. 391 // on Lion.
392 FullscreenNotificationObserver fullscreen_observer; 392 FullscreenNotificationObserver fullscreen_observer;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 874
875 GURL url = test_server()->GetURL("simple.html"); 875 GURL url = test_server()->GetURL("simple.html");
876 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED); 876 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED);
877 877
878 // Validate that going fullscreen for a URL defaults to asking permision. 878 // Validate that going fullscreen for a URL defaults to asking permision.
879 ASSERT_FALSE(IsFullscreenPermissionRequested()); 879 ASSERT_FALSE(IsFullscreenPermissionRequested());
880 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); 880 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true));
881 ASSERT_TRUE(IsFullscreenPermissionRequested()); 881 ASSERT_TRUE(IsFullscreenPermissionRequested());
882 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); 882 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false));
883 } 883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698