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

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

Issue 2786833002: Re-enable BrowserCloseManagerBrowserTest.AddBeforeUnloadDuringClosing. (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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ASSERT_NO_FATAL_FAILURE(AcceptClose()); 737 ASSERT_NO_FATAL_FAILURE(AcceptClose());
738 ASSERT_NO_FATAL_FAILURE(AcceptClose()); 738 ASSERT_NO_FATAL_FAILURE(AcceptClose());
739 ASSERT_NO_FATAL_FAILURE(AcceptClose()); 739 ASSERT_NO_FATAL_FAILURE(AcceptClose());
740 ASSERT_NO_FATAL_FAILURE(AcceptClose()); 740 ASSERT_NO_FATAL_FAILURE(AcceptClose());
741 741
742 close_observer.Wait(); 742 close_observer.Wait();
743 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); 743 EXPECT_TRUE(browser_shutdown::IsTryingToQuit());
744 EXPECT_TRUE(BrowserList::GetInstance()->empty()); 744 EXPECT_TRUE(BrowserList::GetInstance()->empty());
745 } 745 }
746 746
747 #if defined(OS_MACOSX)
748 // Flaky on Mac OSX. See http://crbug.com/700271.
749 #define MAYBE_AddBeforeUnloadDuringClosing DISABLED_AddBeforeUnloadDuringClosing
750 #else
751 #define MAYBE_AddBeforeUnloadDuringClosing AddBeforeUnloadDuringClosing
752 #endif
753 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, 747 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
754 MAYBE_AddBeforeUnloadDuringClosing) { 748 AddBeforeUnloadDuringClosing) {
755 // TODO(crbug.com/250305): Currently FastUnloadController is broken. 749 // TODO(crbug.com/250305): Currently FastUnloadController is broken.
756 // And it is difficult to fix this issue without fixing that one. 750 // And it is difficult to fix this issue without fixing that one.
757 if (GetParam()) 751 if (GetParam())
758 return; 752 return;
759 753
760 ASSERT_TRUE(embedded_test_server()->Start()); 754 ASSERT_TRUE(embedded_test_server()->Start());
761 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL( 755 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(
762 browser(), embedded_test_server()->GetURL("/title1.html"))); 756 browser(), embedded_test_server()->GetURL("/title1.html")));
763 757
764 // Open second window. 758 // Open second window.
(...skipping 528 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