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

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

Issue 18576005: [Mac] Adds a flag to force 10.6-style fullscreen for testing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove broken DCHECK. Created 7 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
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/fullscreen.h"
7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
11 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.h" 12 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.h"
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" 13 #include "chrome/browser/ui/tabs/tab_strip_model.h"
13 #include "chrome/test/base/interactive_test_utils.h" 14 #include "chrome/test/base/interactive_test_utils.h"
14 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
16 #include "content/public/browser/render_widget_host_view.h" 17 #include "content/public/browser/render_widget_host_view.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 381
381 { 382 {
382 FullscreenNotificationObserver fullscreen_observer; 383 FullscreenNotificationObserver fullscreen_observer;
383 chrome::ToggleFullscreenMode(browser()); 384 chrome::ToggleFullscreenMode(browser());
384 fullscreen_observer.Wait(); 385 fullscreen_observer.Wait();
385 EXPECT_FALSE(browser()->window()->IsFullscreen()); 386 EXPECT_FALSE(browser()->window()->IsFullscreen());
386 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome()); 387 EXPECT_FALSE(browser()->window()->IsFullscreenWithChrome());
387 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome()); 388 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome());
388 } 389 }
389 390
390 if (base::mac::IsOSLionOrLater()) { 391 if (chrome::mac::SupportsSystemFullscreen()) {
391 // Test that tab fullscreen mode doesn't make presentation mode the default 392 // Test that tab fullscreen mode doesn't make presentation mode the default
392 // on Lion. 393 // on Lion.
393 FullscreenNotificationObserver fullscreen_observer; 394 FullscreenNotificationObserver fullscreen_observer;
394 chrome::ToggleFullscreenMode(browser()); 395 chrome::ToggleFullscreenMode(browser());
395 fullscreen_observer.Wait(); 396 fullscreen_observer.Wait();
396 EXPECT_TRUE(browser()->window()->IsFullscreen()); 397 EXPECT_TRUE(browser()->window()->IsFullscreen());
397 EXPECT_TRUE(browser()->window()->IsFullscreenWithChrome()); 398 EXPECT_TRUE(browser()->window()->IsFullscreenWithChrome());
398 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome()); 399 EXPECT_FALSE(browser()->window()->IsFullscreenWithoutChrome());
399 } 400 }
400 } 401 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 876
876 GURL url = test_server()->GetURL("simple.html"); 877 GURL url = test_server()->GetURL("simple.html");
877 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED); 878 AddTabAtIndex(0, url, PAGE_TRANSITION_TYPED);
878 879
879 // Validate that going fullscreen for a URL defaults to asking permision. 880 // Validate that going fullscreen for a URL defaults to asking permision.
880 ASSERT_FALSE(IsFullscreenPermissionRequested()); 881 ASSERT_FALSE(IsFullscreenPermissionRequested());
881 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true)); 882 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(true));
882 ASSERT_TRUE(IsFullscreenPermissionRequested()); 883 ASSERT_TRUE(IsFullscreenPermissionRequested());
883 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false)); 884 ASSERT_NO_FATAL_FAILURE(ToggleTabFullscreenNoRetries(false));
884 } 885 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698