Index: chrome/browser/apps/app_browsertest_util.cc |
diff --git a/chrome/browser/apps/app_browsertest_util.cc b/chrome/browser/apps/app_browsertest_util.cc |
index 7eb201d691716257c79e947b93d84209bc931d55..31d56165ca3c4dcd3ace5346019421d7ca1ad645 100644 |
--- a/chrome/browser/apps/app_browsertest_util.cc |
+++ b/chrome/browser/apps/app_browsertest_util.cc |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/ui/extensions/application_launch.h" |
#include "chrome/common/chrome_switches.h" |
#include "content/public/browser/notification_service.h" |
+#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/test_utils.h" |
#include "extensions/common/switches.h" |
@@ -171,11 +172,10 @@ ShellWindow* PlatformAppBrowserTest::CreateShellWindowFromParams( |
} |
void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) { |
- content::WindowedNotificationObserver destroyed_observer( |
- content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
- content::NotificationService::AllSources()); |
+ content::WebContentsDestroyedWatcher destroyed_watcher( |
+ window->web_contents()); |
window->GetBaseWindow()->Close(); |
- destroyed_observer.Wait(); |
+ destroyed_watcher.Wait(); |
} |
void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForShellWindow( |