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

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_controller_browsertest.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: fix 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/host_content_settings_map.h" 7 #include "chrome/browser/content_settings/host_content_settings_map.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
11 #include "chrome/browser/ui/browser_tabstrip.h" 11 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/browser/ui/browser_window.h" 12 #include "chrome/browser/ui/browser_window.h"
13 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
13 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.h" 14 #include "chrome/browser/ui/fullscreen/fullscreen_controller_test.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/web_contents.h" 17 #include "content/public/browser/web_contents.h"
17 #include "content/public/common/url_constants.h" 18 #include "content/public/common/url_constants.h"
18 #include "content/public/test/test_navigation_observer.h" 19 #include "content/public/test/test_navigation_observer.h"
19 #if defined(OS_MACOSX) 20 #if defined(OS_MACOSX)
20 #include "base/mac/mac_util.h" 21 #include "base/mac/mac_util.h"
21 #endif 22 #endif
22 23
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 browser()->TogglePresentationMode(); 320 browser()->TogglePresentationMode();
320 fullscreen_observer.Wait(); 321 fullscreen_observer.Wait();
321 ASSERT_FALSE(browser()->window()->IsFullscreen()); 322 ASSERT_FALSE(browser()->window()->IsFullscreen());
322 ASSERT_FALSE(browser()->window()->InPresentationMode()); 323 ASSERT_FALSE(browser()->window()->InPresentationMode());
323 } 324 }
324 325
325 if (base::mac::IsOSLionOrLater()) { 326 if (base::mac::IsOSLionOrLater()) {
326 // Test that tab fullscreen mode doesn't make presentation mode the default 327 // Test that tab fullscreen mode doesn't make presentation mode the default
327 // on Lion. 328 // on Lion.
328 FullscreenNotificationObserver fullscreen_observer; 329 FullscreenNotificationObserver fullscreen_observer;
329 browser()->ToggleFullscreenMode(); 330 chrome::ToggleFullscreenMode(browser());
330 fullscreen_observer.Wait(); 331 fullscreen_observer.Wait();
331 ASSERT_TRUE(browser()->window()->IsFullscreen()); 332 ASSERT_TRUE(browser()->window()->IsFullscreen());
332 ASSERT_FALSE(browser()->window()->InPresentationMode()); 333 ASSERT_FALSE(browser()->window()->InPresentationMode());
333 } 334 }
334 } 335 }
335 #endif 336 #endif
336 337
337 IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, 338 IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
338 PendingMouseLockExitsOnTabSwitch) { 339 PendingMouseLockExitsOnTabSwitch) {
339 AddTabAtIndexAndWait(0, GURL(chrome::kAboutBlankURL), 340 AddTabAtIndexAndWait(0, GURL(chrome::kAboutBlankURL),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 ASSERT_TRUE(IsFullscreenBubbleDisplayed()); 383 ASSERT_TRUE(IsFullscreenBubbleDisplayed());
383 384
384 // Close tab. Bubble is cleared. 385 // Close tab. Bubble is cleared.
385 { 386 {
386 MouseLockNotificationObserver mouse_lock_observer; 387 MouseLockNotificationObserver mouse_lock_observer;
387 chrome::CloseTab(browser()); 388 chrome::CloseTab(browser());
388 mouse_lock_observer.Wait(); 389 mouse_lock_observer.Wait();
389 } 390 }
390 ASSERT_FALSE(IsFullscreenBubbleDisplayed()); 391 ASSERT_FALSE(IsFullscreenBubbleDisplayed());
391 } 392 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/application_launch.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698