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

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

Issue 1814923002: Nuke NotificationUIManager from PlatformNotificationServiceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@profile_manager_load
Patch Set: Created 4 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
Index: chrome/browser/notifications/platform_notification_service_browsertest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_browsertest.cc b/chrome/browser/notifications/platform_notification_service_browsertest.cc
index 48e167efae3c29dd934321d979007f61e2c6c663..0b0997956018b08a46f52887036866fab9a1adcb 100644
--- a/chrome/browser/notifications/platform_notification_service_browsertest.cc
+++ b/chrome/browser/notifications/platform_notification_service_browsertest.cc
@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/notifications/desktop_notification_profile_util.h"
+#include "chrome/browser/notifications/message_center_display_service.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_test_util.h"
#include "chrome/browser/notifications/platform_notification_service_impl.h"
@@ -94,6 +95,7 @@ class PlatformNotificationServiceBrowserTest : public InProcessBrowserTest {
const base::FilePath server_root_;
const std::string test_page_url_;
std::unique_ptr<StubNotificationUIManager> ui_manager_;
+ std::unique_ptr<MessageCenterDisplayService> display_service_;
std::unique_ptr<net::EmbeddedTestServer> https_server_;
};
@@ -122,20 +124,19 @@ void PlatformNotificationServiceBrowserTest::SetUp() {
new net::EmbeddedTestServer(net::EmbeddedTestServer::TYPE_HTTPS));
https_server_->ServeFilesFromSourceDirectory(server_root_);
ASSERT_TRUE(https_server_->Start());
-
- service()->SetNotificationUIManagerForTesting(ui_manager_.get());
-
InProcessBrowserTest::SetUp();
}
void PlatformNotificationServiceBrowserTest::SetUpOnMainThread() {
NavigateToTestPage(test_page_url_);
-
+ display_service_.reset(
+ new MessageCenterDisplayService(browser()->profile(), ui_manager_.get()));
+ service()->SetNotificationDisplayServiceForTesting(display_service_.get());
InProcessBrowserTest::SetUpOnMainThread();
}
void PlatformNotificationServiceBrowserTest::TearDown() {
- service()->SetNotificationUIManagerForTesting(nullptr);
+ service()->SetNotificationDisplayServiceForTesting(nullptr);
}
void PlatformNotificationServiceBrowserTest::

Powered by Google App Engine
This is Rietveld 408576698