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

Side by Side Diff: chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc

Issue 1699973002: Remove HostDesktopType from BrowserWithTestWindowTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-22
Patch Set: cros Created 4 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
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/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_tabstrip.h" 8 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" 9 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 834
835 // Enter tab fullscreen. Since the tab is being captured, the browser window 835 // Enter tab fullscreen. Since the tab is being captured, the browser window
836 // should not expand to fill the screen. 836 // should not expand to fill the screen.
837 ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE)); 837 ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE));
838 EXPECT_FALSE(browser()->window()->IsFullscreen()); 838 EXPECT_FALSE(browser()->window()->IsFullscreen());
839 EXPECT_TRUE(wc_delegate->IsFullscreenForTabOrPending(tab)); 839 EXPECT_TRUE(wc_delegate->IsFullscreenForTabOrPending(tab));
840 EXPECT_FALSE(GetFullscreenController()->IsWindowFullscreenForTabOrPending()); 840 EXPECT_FALSE(GetFullscreenController()->IsWindowFullscreenForTabOrPending());
841 841
842 // Create the second browser window. 842 // Create the second browser window.
843 const scoped_ptr<BrowserWindow> second_browser_window(CreateBrowserWindow()); 843 const scoped_ptr<BrowserWindow> second_browser_window(CreateBrowserWindow());
844 const scoped_ptr<Browser> second_browser(CreateBrowser( 844 const scoped_ptr<Browser> second_browser(
845 browser()->profile(), 845 CreateBrowser(browser()->profile(), browser()->type(), false,
846 browser()->type(), 846 second_browser_window.get()));
847 false,
848 browser()->host_desktop_type(),
849 second_browser_window.get()));
850 AddTab(second_browser.get(), GURL(url::kAboutBlankURL)); 847 AddTab(second_browser.get(), GURL(url::kAboutBlankURL));
851 content::WebContentsDelegate* const second_wc_delegate = 848 content::WebContentsDelegate* const second_wc_delegate =
852 static_cast<content::WebContentsDelegate*>(second_browser.get()); 849 static_cast<content::WebContentsDelegate*>(second_browser.get());
853 850
854 // Detach the tab from the first browser window and attach it to the second. 851 // Detach the tab from the first browser window and attach it to the second.
855 // The tab should remain in fullscreen mode and neither browser window should 852 // The tab should remain in fullscreen mode and neither browser window should
856 // have expanded. It is correct for both FullscreenControllers to agree the 853 // have expanded. It is correct for both FullscreenControllers to agree the
857 // tab is in fullscreen mode. 854 // tab is in fullscreen mode.
858 browser()->tab_strip_model()->DetachWebContentsAt(0); 855 browser()->tab_strip_model()->DetachWebContentsAt(0);
859 second_browser->tab_strip_model()-> 856 second_browser->tab_strip_model()->
(...skipping 28 matching lines...) Expand all
888 EXPECT_FALSE(wc_delegate->IsFullscreenForTabOrPending(tab)); 885 EXPECT_FALSE(wc_delegate->IsFullscreenForTabOrPending(tab));
889 EXPECT_FALSE(second_wc_delegate->IsFullscreenForTabOrPending(tab)); 886 EXPECT_FALSE(second_wc_delegate->IsFullscreenForTabOrPending(tab));
890 EXPECT_FALSE(GetFullscreenController()->IsWindowFullscreenForTabOrPending()); 887 EXPECT_FALSE(GetFullscreenController()->IsWindowFullscreenForTabOrPending());
891 EXPECT_FALSE(second_browser->exclusive_access_manager() 888 EXPECT_FALSE(second_browser->exclusive_access_manager()
892 ->fullscreen_controller() 889 ->fullscreen_controller()
893 ->IsWindowFullscreenForTabOrPending()); 890 ->IsWindowFullscreenForTabOrPending());
894 891
895 // Required tear-down specific to this test. 892 // Required tear-down specific to this test.
896 second_browser->tab_strip_model()->CloseAllTabs(); 893 second_browser->tab_strip_model()->CloseAllTabs();
897 } 894 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698