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

Unified Diff: chrome/browser/notifications/notification_browsertest.cc

Issue 26277010: Create content::WebContentsDestroyedWatcher, use it in many tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 2 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/notifications/notification_browsertest.cc
diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc
index b246ebb5e25f54dfce3cdd02ecc25a5beab9fe81..de06963a734fa963a8692ec04614876ef58edd7f 100644
--- a/chrome/browser/notifications/notification_browsertest.cc
+++ b/chrome/browser/notifications/notification_browsertest.cc
@@ -856,12 +856,11 @@ IN_PROC_BROWSER_TEST_F(NotificationsTest, TestCloseTabWithPermissionInfobar) {
browser()->tab_strip_model()->ActivateTabAt(0, true);
ui_test_utils::NavigateToURL(browser(), GetTestPageURL());
ASSERT_TRUE(RequestPermissionAndWait(browser()));
- content::WindowedNotificationObserver observer(
- content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
- content::NotificationService::AllSources());
+ content::WebContentsDestroyedWatcher destroyed_watcher(
+ browser()->tab_strip_model()->GetWebContentsAt(0));
browser()->tab_strip_model()->CloseWebContentsAt(0,
TabStripModel::CLOSE_NONE);
- observer.Wait();
+ destroyed_watcher.Wait();
}
IN_PROC_BROWSER_TEST_F(

Powered by Google App Engine
This is Rietveld 408576698