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

Side by Side Diff: chrome/browser/lifetime/browser_close_manager_browsertest.cc

Issue 2784113002: Re-enable BrowserCloseManagerBrowserTest.TestCloseTabDuringShutdown. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/lifetime/browser_close_manager.h" 5 #include "chrome/browser/lifetime/browser_close_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 : BrowserList::GetInstance()->get(1); 840 : BrowserList::GetInstance()->get(1);
841 841
842 // Check the restored browser contents. 842 // Check the restored browser contents.
843 EXPECT_EQ(2, browser2->tab_strip_model()->count()); 843 EXPECT_EQ(2, browser2->tab_strip_model()->count());
844 EXPECT_EQ(embedded_test_server()->GetURL("/beforeunload.html"), 844 EXPECT_EQ(embedded_test_server()->GetURL("/beforeunload.html"),
845 browser2->tab_strip_model()->GetWebContentsAt(0)->GetURL()); 845 browser2->tab_strip_model()->GetWebContentsAt(0)->GetURL());
846 EXPECT_EQ(embedded_test_server()->GetURL("/title2.html"), 846 EXPECT_EQ(embedded_test_server()->GetURL("/title2.html"),
847 browser2->tab_strip_model()->GetWebContentsAt(1)->GetURL()); 847 browser2->tab_strip_model()->GetWebContentsAt(1)->GetURL());
848 } 848 }
849 849
850 // Flaky on Linux. http://crbug.com/700641.
851 #if defined(OS_LINUX)
852 #define MAYBE_TestCloseTabDuringShutdown DISABLED_TestCloseTabDuringShutdown
853 #else
854 #define MAYBE_TestCloseTabDuringShutdown TestCloseTabDuringShutdown
855 #endif
856 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, 850 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
857 MAYBE_TestCloseTabDuringShutdown) { 851 TestCloseTabDuringShutdown) {
858 ASSERT_TRUE(embedded_test_server()->Start()); 852 ASSERT_TRUE(embedded_test_server()->Start());
859 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL( 853 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(
860 browsers_[0], embedded_test_server()->GetURL("/beforeunload.html"))); 854 browsers_[0], embedded_test_server()->GetURL("/beforeunload.html")));
861 DisableHangMonitor(browsers_[0]); 855 DisableHangMonitor(browsers_[0]);
862 856
863 RepeatedNotificationObserver cancel_observer( 857 RepeatedNotificationObserver cancel_observer(
864 chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1); 858 chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
865 chrome::CloseAllBrowsersAndQuit(); 859 chrome::CloseAllBrowsersAndQuit();
866 860
867 browsers_.push_back(CreateBrowser(browser()->profile())); 861 browsers_.push_back(CreateBrowser(browser()->profile()));
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 1287
1294 chrome::CloseAllBrowsers(); 1288 chrome::CloseAllBrowsers();
1295 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); 1289 EXPECT_FALSE(browser_shutdown::IsTryingToQuit());
1296 EXPECT_TRUE(BrowserList::GetInstance()->empty()); 1290 EXPECT_TRUE(BrowserList::GetInstance()->empty());
1297 EXPECT_TRUE(IsBackgroundModeSuspended()); 1291 EXPECT_TRUE(IsBackgroundModeSuspended());
1298 } 1292 }
1299 1293
1300 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, 1294 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
1301 BrowserCloseManagerWithBackgroundModeBrowserTest, 1295 BrowserCloseManagerWithBackgroundModeBrowserTest,
1302 testing::Bool()); 1296 testing::Bool());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698