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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 8369013: Fix the segfault on Linux when closing a tab that is in tab fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 { 870 {
871 ui_test_utils::WindowedNotificationObserver fullscreen_observer( 871 ui_test_utils::WindowedNotificationObserver fullscreen_observer(
872 chrome::NOTIFICATION_FULLSCREEN_CHANGED, 872 chrome::NOTIFICATION_FULLSCREEN_CHANGED,
873 content::NotificationService::AllSources()); 873 content::NotificationService::AllSources());
874 browser()->ToggleFullscreenModeForTab(fullscreen_tab, false); 874 browser()->ToggleFullscreenModeForTab(fullscreen_tab, false);
875 fullscreen_observer.Wait(); 875 fullscreen_observer.Wait();
876 ASSERT_FALSE(browser()->window()->IsFullscreen()); 876 ASSERT_FALSE(browser()->window()->IsFullscreen());
877 } 877 }
878 } 878 }
879 879
880 #if defined(OS_LINUX) 880 IN_PROC_BROWSER_TEST_F(BrowserTest, TestFullscreenBubbleMouseLockState) {
881 // http://crbug.com/100680.
882 #define MAYBE_TestFullscreenBubbleMouseLockState \
883 DISABLED_TestFullscreenBubbleMouseLockState
884 #else
885 #define MAYBE_TestFullscreenBubbleMouseLockState \
886 TestFullscreenBubbleMouseLockState
887 #endif
888
889 IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TestFullscreenBubbleMouseLockState) {
890 ASSERT_TRUE(test_server()->Start()); 881 ASSERT_TRUE(test_server()->Start());
891 882
892 AddTabAtIndex(0, GURL(chrome::kAboutBlankURL), 883 AddTabAtIndex(0, GURL(chrome::kAboutBlankURL),
893 content::PAGE_TRANSITION_TYPED); 884 content::PAGE_TRANSITION_TYPED);
885 AddTabAtIndex(1, GURL(chrome::kAboutBlankURL),
886 content::PAGE_TRANSITION_TYPED);
894 887
895 TabContents* fullscreen_tab = browser()->GetSelectedTabContents(); 888 TabContents* fullscreen_tab = browser()->GetSelectedTabContents();
896 889
897 { 890 {
898 ui_test_utils::WindowedNotificationObserver fullscreen_observer( 891 ui_test_utils::WindowedNotificationObserver fullscreen_observer(
899 chrome::NOTIFICATION_FULLSCREEN_CHANGED, 892 chrome::NOTIFICATION_FULLSCREEN_CHANGED,
900 content::NotificationService::AllSources()); 893 content::NotificationService::AllSources());
901 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true); 894 browser()->ToggleFullscreenModeForTab(fullscreen_tab, true);
902 fullscreen_observer.Wait(); 895 fullscreen_observer.Wait();
903 ASSERT_TRUE(browser()->window()->IsFullscreen()); 896 ASSERT_TRUE(browser()->window()->IsFullscreen());
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 1227
1235 // The normal browser should now have four. 1228 // The normal browser should now have four.
1236 EXPECT_EQ(4, browser()->tab_count()); 1229 EXPECT_EQ(4, browser()->tab_count());
1237 1230
1238 // Close the additional browsers. 1231 // Close the additional browsers.
1239 popup_browser->CloseAllTabs(); 1232 popup_browser->CloseAllTabs();
1240 app_browser->CloseAllTabs(); 1233 app_browser->CloseAllTabs();
1241 app_popup_browser->CloseAllTabs(); 1234 app_popup_browser->CloseAllTabs();
1242 } 1235 }
1243 #endif 1236 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698