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

Unified Diff: chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc

Issue 2803593003: Delay deleting profile notification (Closed)
Patch Set: fix hats test Created 3 years, 8 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 | « no previous file | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
diff --git a/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc b/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
index a02eff45ce7c5e4b4415331fa84f65501c630b5e..cc69995ddde973342e454e8ebc65164c4f82bec9 100644
--- a/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
+++ b/chrome/browser/chromeos/hats/hats_notification_controller_unittest.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/hats/hats_notification_controller.h"
+#include "base/run_loop.h"
#include "base/strings/string_split.h"
#include "chrome/browser/notifications/message_center_notification_manager.h"
#include "chrome/browser/notifications/notification.h"
@@ -113,6 +114,9 @@ class HatsNotificationControllerTest : public BrowserWithTestWindowTest {
void TearDown() override {
g_browser_process->notification_ui_manager()->StartShutdown();
+ // The notifications may be deleted async.
+ base::RunLoop loop;
+ loop.RunUntilIdle();
profile_manager_.reset();
network_portal_detector::InitializeForTesting(nullptr);
BrowserWithTestWindowTest::TearDown();
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698