| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
|
| index 3addbf6dd80bd8453f13d2d8c68a3b2867dffff7..830663bce328e9d713a7852b12efe38e4b83429f 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
|
| @@ -49,6 +49,7 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/test/browser_test_utils.h"
|
| #include "extensions/common/switches.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/app_list/views/apps_grid_view.h"
|
| @@ -846,11 +847,9 @@ IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, LaunchPinned) {
|
| EXPECT_EQ(++tab_count, tab_strip->count());
|
| EXPECT_EQ(ash::STATUS_ACTIVE, (*model_->ItemByID(shortcut_id)).status);
|
| WebContents* tab = tab_strip->GetActiveWebContents();
|
| - content::WindowedNotificationObserver close_observer(
|
| - content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| - content::Source<WebContents>(tab));
|
| + content::WebContentsDestroyedWatcher destroyed_watcher(tab);
|
| browser()->tab_strip_model()->CloseSelectedTabs();
|
| - close_observer.Wait();
|
| + destroyed_watcher.Wait();
|
| EXPECT_EQ(--tab_count, tab_strip->count());
|
| EXPECT_EQ(ash::STATUS_CLOSED, (*model_->ItemByID(shortcut_id)).status);
|
| }
|
| @@ -865,11 +864,9 @@ IN_PROC_BROWSER_TEST_F(LauncherAppBrowserTest, LaunchUnpinned) {
|
| ash::LauncherID shortcut_id = CreateShortcut("app1");
|
| EXPECT_EQ(ash::STATUS_ACTIVE, (*model_->ItemByID(shortcut_id)).status);
|
| WebContents* tab = tab_strip->GetActiveWebContents();
|
| - content::WindowedNotificationObserver close_observer(
|
| - content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
|
| - content::Source<WebContents>(tab));
|
| + content::WebContentsDestroyedWatcher destroyed_watcher(tab);
|
| browser()->tab_strip_model()->CloseSelectedTabs();
|
| - close_observer.Wait();
|
| + destroyed_watcher.Wait();
|
| EXPECT_EQ(--tab_count, tab_strip->count());
|
| EXPECT_EQ(ash::STATUS_CLOSED, (*model_->ItemByID(shortcut_id)).status);
|
| }
|
|
|