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

Unified Diff: chrome/browser/apps/app_window_interactive_uitest.cc

Issue 1778873002: Replace Increment/DecrementKeepAliveCount by ScopedKeepAlives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KAObserver
Patch Set: replace the commented dcheck by a dlog Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/app_window_interactive_uitest.cc
diff --git a/chrome/browser/apps/app_window_interactive_uitest.cc b/chrome/browser/apps/app_window_interactive_uitest.cc
index 4099c7d35c23dbcd72a30c091db8cb48a8e1e024..f7e32b317e3d7a548b15662eb01310782314223f 100644
--- a/chrome/browser/apps/app_window_interactive_uitest.cc
+++ b/chrome/browser/apps/app_window_interactive_uitest.cc
@@ -6,6 +6,7 @@
#include "build/build_config.h"
#include "chrome/browser/apps/app_browsertest_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/keep_alive_registry.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/test/base/interactive_test_utils.h"
@@ -528,9 +529,9 @@ IN_PROC_BROWSER_TEST_F(AppWindowHiddenKeepAliveTest, ShownThenHidden) {
for (auto* browser : *BrowserList::GetInstance())
browser->window()->Close();
- EXPECT_TRUE(chrome::WillKeepAlive());
+ EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
GetFirstAppWindow()->Hide();
- EXPECT_FALSE(chrome::WillKeepAlive());
+ EXPECT_FALSE(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
}
// A window that is hidden but re-shown should still keep Chrome alive.
@@ -540,10 +541,10 @@ IN_PROC_BROWSER_TEST_F(AppWindowHiddenKeepAliveTest, ShownThenHiddenThenShown) {
app_window->Hide();
app_window->Show(AppWindow::SHOW_ACTIVE);
- EXPECT_TRUE(chrome::WillKeepAlive());
+ EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
for (auto* browser : *BrowserList::GetInstance())
browser->window()->Close();
- EXPECT_TRUE(chrome::WillKeepAlive());
+ EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
app_window->GetBaseWindow()->Close();
}
@@ -577,7 +578,7 @@ IN_PROC_BROWSER_TEST_F(AppWindowHiddenKeepAliveTest, HiddenThenShown) {
launched_listener.Reply("");
EXPECT_TRUE(shown_listener.WaitUntilSatisfied());
EXPECT_FALSE(app_window->is_hidden());
- EXPECT_TRUE(chrome::WillKeepAlive());
+ EXPECT_TRUE(KeepAliveRegistry::GetInstance()->IsKeepingAlive());
app_window->GetBaseWindow()->Close();
}
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698