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

Unified Diff: chrome/browser/lifetime/browser_close_manager_browsertest.cc

Issue 2798143004: Fix for URL opening code (Closed)
Patch Set: Fixed class name usage. Created 3 years, 6 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
Index: chrome/browser/lifetime/browser_close_manager_browsertest.cc
diff --git a/chrome/browser/lifetime/browser_close_manager_browsertest.cc b/chrome/browser/lifetime/browser_close_manager_browsertest.cc
index d4e0baaa7a1bb318ad7d72161e65f32cd74a5ba9..0a4173af4a372dd04b97612ef05191edd3397219 100644
--- a/chrome/browser/lifetime/browser_close_manager_browsertest.cc
+++ b/chrome/browser/lifetime/browser_close_manager_browsertest.cc
@@ -52,6 +52,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/download_test_observer.h"
+#include "content/public/test/repeated_notification_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/url_request/url_request_mock_http_job.h"
@@ -82,41 +83,6 @@ void CancelClose() {
GetNextDialog()->CancelAppModalDialog();
}
-class RepeatedNotificationObserver : public content::NotificationObserver {
- public:
- explicit RepeatedNotificationObserver(int type, int count)
- : num_outstanding_(count), running_(false) {
- registrar_.Add(this, type, content::NotificationService::AllSources());
- }
-
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override {
- ASSERT_GT(num_outstanding_, 0);
- if (!--num_outstanding_ && running_) {
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE, run_loop_.QuitClosure());
- }
- }
-
- void Wait() {
- if (num_outstanding_ <= 0)
- return;
-
- running_ = true;
- run_loop_.Run();
- running_ = false;
- }
-
- private:
- int num_outstanding_;
- content::NotificationRegistrar registrar_;
- bool running_;
- base::RunLoop run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(RepeatedNotificationObserver);
-};
-
class TabRestoreServiceChangesObserver
: public sessions::TabRestoreServiceObserver {
public:
@@ -306,7 +272,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, TestSingleTabShutdown) {
browser(), embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browser());
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -314,7 +280,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, TestSingleTabShutdown) {
EXPECT_FALSE(browser_shutdown::IsTryingToQuit());
EXPECT_EQ(1, browser()->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -330,7 +296,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
browser(), embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browser());
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
chrome::CloseAllBrowsersAndQuit();
@@ -339,7 +305,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_FALSE(browser_shutdown::IsTryingToQuit());
EXPECT_EQ(1, browser()->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
chrome::CloseAllBrowsersAndQuit();
chrome::CloseAllBrowsersAndQuit();
@@ -359,7 +325,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIAboutURL)));
PrepareForDialog(browser());
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -376,7 +342,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
ASSERT_NO_FATAL_FAILURE(AcceptClose());
navigation_observer.Wait();
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
chrome::CloseAllBrowsersAndQuit();
close_observer.Wait();
@@ -410,7 +376,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, TestMultipleWindows) {
// Cancel shutdown on the first beforeunload event.
{
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -422,7 +388,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, TestMultipleWindows) {
// Cancel shutdown on the second beforeunload event.
{
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -434,7 +400,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest, TestMultipleWindows) {
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
// Allow shutdown for both beforeunload events.
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -462,7 +428,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
// the dialog is guaranteed to show.
PrepareForDialog(browsers_[0]->tab_strip_model()->GetWebContentsAt(1));
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -471,7 +437,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
// All tabs should still be open.
EXPECT_EQ(3, browsers_[0]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -498,7 +464,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
// the dialog is guaranteed to show.
PrepareForDialog(browsers_[1]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -509,7 +475,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
EXPECT_EQ(1, browsers_[2]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 3);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -544,7 +510,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
PrepareForDialog(
browsers_[0]->tab_strip_model()->GetWebContentsAt(kResposiveTabIndex));
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -553,7 +519,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
// All tabs should still be open.
EXPECT_EQ(kTabCount, browsers_[0]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
// Quit, this time accepting close confirmation dialog.
@@ -592,7 +558,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
// the dialog is guaranteed to show.
PrepareForDialog(browsers_[kResposiveBrowserIndex]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, kResposiveBrowserIndex + 1);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(CancelClose());
@@ -604,7 +570,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[i]->tab_strip_model()->count());
// Quit, this time accepting close confirmation dialog.
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, kBrowserCount);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -621,7 +587,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
browsers_[0], embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browsers_[0]);
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
browsers_.push_back(CreateBrowser(browser()->profile()));
@@ -640,7 +606,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
browsers_[0], embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browsers_[0]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 2);
chrome::CloseAllBrowsersAndQuit();
browsers_.push_back(CreateBrowser(browser()->profile()));
@@ -655,7 +621,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
// Allow shutdown for both beforeunload dialogs.
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -677,7 +643,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
PrepareForDialog(browsers_[0]);
PrepareForDialog(browsers_[1]);
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -703,7 +669,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
PrepareForDialog(browsers_[0]);
PrepareForDialog(browsers_[1]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -722,7 +688,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(2, browsers_[0]->tab_strip_model()->count());
EXPECT_EQ(2, browsers_[1]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_NO_FATAL_FAILURE(AcceptClose());
@@ -847,7 +813,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
browsers_[0], embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browsers_[0]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
@@ -863,7 +829,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[0]->tab_strip_model()->count());
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
browsers_[1]->tab_strip_model()->CloseAllTabs();
@@ -882,7 +848,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
browsers_[0], embedded_test_server()->GetURL("/beforeunload.html")));
PrepareForDialog(browsers_[0]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 2);
chrome::CloseAllBrowsersAndQuit();
@@ -898,7 +864,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[0]->tab_strip_model()->count());
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_FALSE(browsers_[1]->ShouldCloseWindow());
@@ -921,7 +887,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
PrepareForDialog(browsers_[0]);
PrepareForDialog(browsers_[1]);
- RepeatedNotificationObserver cancel_observer(
+ content::RepeatedNotificationObserver cancel_observer(
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, 1);
chrome::CloseAllBrowsersAndQuit();
@@ -932,7 +898,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerBrowserTest,
EXPECT_EQ(1, browsers_[0]->tab_strip_model()->count());
EXPECT_EQ(1, browsers_[1]->tab_strip_model()->count());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
chrome::CloseAllBrowsersAndQuit();
ASSERT_FALSE(browsers_[0]->ShouldCloseWindow());
@@ -982,7 +948,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
SetDownloadPathForProfile(browser()->profile());
ASSERT_NO_FATAL_FAILURE(CreateStalledDownload(browser()));
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
TestBrowserCloseManager::AttemptClose(
@@ -1031,7 +997,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
browser()->profile())->NonMaliciousInProgressCount());
// Close the browser with no user action.
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
TestBrowserCloseManager::AttemptClose(
TestBrowserCloseManager::NO_USER_CHOICE);
@@ -1055,7 +1021,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
EXPECT_EQ(GURL(chrome::kChromeUIDownloadsURL),
browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
TestBrowserCloseManager::AttemptClose(
@@ -1077,7 +1043,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
SetDownloadPathForProfile(otr_profile);
Browser* otr_browser = CreateBrowser(otr_profile);
{
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
browser()->window()->Close();
close_observer.Wait();
@@ -1092,7 +1058,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
EXPECT_EQ(GURL(chrome::kChromeUIDownloadsURL),
otr_browser->tab_strip_model()->GetActiveWebContents()->GetURL());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
TestBrowserCloseManager::AttemptClose(
@@ -1126,7 +1092,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
ASSERT_EQ(0, num_downloads_blocking);
{
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
otr_browser->window()->Close();
close_observer.Wait();
@@ -1138,7 +1104,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
ASSERT_EQ(1, num_downloads_blocking);
{
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
TestBrowserCloseManager::AttemptClose(
TestBrowserCloseManager::USER_CHOICE_USER_ALLOWS_CLOSE);
@@ -1176,7 +1142,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
SetDownloadPathForProfile(other_profile);
ASSERT_NO_FATAL_FAILURE(CreateStalledDownload(browser()));
{
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
browser()->window()->Close();
close_observer.Wait();
@@ -1197,7 +1163,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
other_profile_browser->tab_strip_model()->GetActiveWebContents()
->GetURL());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 2);
TestBrowserCloseManager::AttemptClose(
TestBrowserCloseManager::USER_CHOICE_USER_ALLOWS_CLOSE);
@@ -1229,7 +1195,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithDownloadsBrowserTest,
cancel_observer.Wait();
EXPECT_FALSE(browser_shutdown::IsTryingToQuit());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
TestBrowserCloseManager::AttemptClose(
TestBrowserCloseManager::USER_CHOICE_USER_ALLOWS_CLOSE);
@@ -1275,7 +1241,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
std::unique_ptr<ScopedKeepAlive> tmp_keep_alive;
Profile* profile = browser()->profile();
{
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
tmp_keep_alive.reset(new ScopedKeepAlive(KeepAliveOrigin::PANEL_VIEW,
KeepAliveRestartOption::DISABLED));
@@ -1292,7 +1258,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
new_browser_observer.WaitForSingleNewBrowser();
tmp_keep_alive.reset();
EXPECT_FALSE(IsBackgroundModeSuspended());
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
// Background mode should not be suspended when quitting.
@@ -1307,7 +1273,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
// background mode.
IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
DISABLED_CloseSingleBrowserWithBackgroundMode) {
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
EXPECT_FALSE(IsBackgroundModeSuspended());
browser()->window()->Close();
@@ -1321,7 +1287,7 @@ IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
// background mode but does not cause Chrome to quit.
IN_PROC_BROWSER_TEST_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
DISABLED_CloseAllBrowsersWithNoOpenBrowsersWithBackgroundMode) {
- RepeatedNotificationObserver close_observer(
+ content::RepeatedNotificationObserver close_observer(
chrome::NOTIFICATION_BROWSER_CLOSED, 1);
EXPECT_FALSE(IsBackgroundModeSuspended());
ScopedKeepAlive tmp_keep_alive(KeepAliveOrigin::PANEL_VIEW,
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698