| OLD | NEW |
| 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 close_observer.Wait(); | 995 close_observer.Wait(); |
| 996 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); | 996 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); |
| 997 EXPECT_TRUE(BrowserList::GetInstance()->empty()); | 997 EXPECT_TRUE(BrowserList::GetInstance()->empty()); |
| 998 EXPECT_FALSE(IsBackgroundModeSuspended()); | 998 EXPECT_FALSE(IsBackgroundModeSuspended()); |
| 999 | 999 |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 // Check that closing the last browser window individually does not affect | 1002 // Check that closing the last browser window individually does not affect |
| 1003 // background mode. | 1003 // background mode. |
| 1004 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest, | 1004 IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest, |
| 1005 CloseSingleBrowserWithBackgroundMode) { | 1005 DISABLED_CloseSingleBrowserWithBackgroundMode) { |
| 1006 RepeatedNotificationObserver close_observer( | 1006 RepeatedNotificationObserver close_observer( |
| 1007 chrome::NOTIFICATION_BROWSER_CLOSED, 1); | 1007 chrome::NOTIFICATION_BROWSER_CLOSED, 1); |
| 1008 EXPECT_FALSE(IsBackgroundModeSuspended()); | 1008 EXPECT_FALSE(IsBackgroundModeSuspended()); |
| 1009 browser()->window()->Close(); | 1009 browser()->window()->Close(); |
| 1010 close_observer.Wait(); | 1010 close_observer.Wait(); |
| 1011 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); | 1011 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); |
| 1012 EXPECT_TRUE(BrowserList::GetInstance()->empty()); | 1012 EXPECT_TRUE(BrowserList::GetInstance()->empty()); |
| 1013 EXPECT_FALSE(IsBackgroundModeSuspended()); | 1013 EXPECT_FALSE(IsBackgroundModeSuspended()); |
| 1014 } | 1014 } |
| 1015 | 1015 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1029 | 1029 |
| 1030 chrome::CloseAllBrowsers(); | 1030 chrome::CloseAllBrowsers(); |
| 1031 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); | 1031 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); |
| 1032 EXPECT_TRUE(BrowserList::GetInstance()->empty()); | 1032 EXPECT_TRUE(BrowserList::GetInstance()->empty()); |
| 1033 EXPECT_TRUE(IsBackgroundModeSuspended()); | 1033 EXPECT_TRUE(IsBackgroundModeSuspended()); |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, | 1036 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, |
| 1037 BrowserCloseManagerWithBackgroundModeBrowserTest, | 1037 BrowserCloseManagerWithBackgroundModeBrowserTest, |
| 1038 testing::Bool()); | 1038 testing::Bool()); |
| OLD | NEW |