| Index: chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| diff --git a/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc b/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| index 091791447f4e4243d73fedc4d02b5a562e441875..7a42235601dbc0e0d07abdd6cbacbd7942eb259c 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| @@ -151,9 +151,6 @@ class NotificationPlatformBridgeLinuxTest : public testing::Test {
|
| ConnectToSignal(kFreedesktopNotificationsName,
|
| "NotificationClosed", _, _))
|
| .WillOnce(RegisterSignalCallback(¬ification_closed_callback_));
|
| -
|
| - notification_bridge_linux_ =
|
| - base::WrapUnique(new NotificationPlatformBridgeLinux(mock_bus_));
|
| }
|
|
|
| void TearDown() override {
|
| @@ -166,6 +163,11 @@ class NotificationPlatformBridgeLinuxTest : public testing::Test {
|
| }
|
|
|
| protected:
|
| + void CreateNotificationBridgeLinux() {
|
| + notification_bridge_linux_ =
|
| + base::WrapUnique(new NotificationPlatformBridgeLinux(mock_bus_));
|
| + }
|
| +
|
| content::TestBrowserThreadBundle thread_bundle_;
|
|
|
| scoped_refptr<dbus::MockBus> mock_bus_;
|
| @@ -180,19 +182,21 @@ class NotificationPlatformBridgeLinuxTest : public testing::Test {
|
| DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeLinuxTest);
|
| };
|
|
|
| -TEST_F(NotificationPlatformBridgeLinuxTest, SetUpAndTearDown) {}
|
| +TEST_F(NotificationPlatformBridgeLinuxTest, SetUpAndTearDown) {
|
| + CreateNotificationBridgeLinux();
|
| +}
|
|
|
| -// Frequently triggers a data race. Disabled as flaky: https://crbug.com/719485
|
| -TEST_F(NotificationPlatformBridgeLinuxTest, DISABLED_NotifyAndCloseFormat) {
|
| +TEST_F(NotificationPlatformBridgeLinuxTest, NotifyAndCloseFormat) {
|
| EXPECT_CALL(*mock_notification_proxy_.get(),
|
| MockCallMethodAndBlock(Calls("Notify"), _))
|
| .WillOnce(OnNotify(1));
|
| + EXPECT_CALL(*mock_notification_proxy_.get(),
|
| + MockCallMethodAndBlock(Calls("CloseNotification"), _))
|
| + .WillOnce(OnCloseNotification());
|
| +
|
| + CreateNotificationBridgeLinux();
|
| notification_bridge_linux_->Display(NotificationCommon::PERSISTENT, "", "",
|
| false,
|
| CreateNotification("id1", "", "", ""));
|
| -
|
| - EXPECT_CALL(*mock_notification_proxy_.get(),
|
| - MockCallMethodAndBlock(Calls("CloseNotification"), _))
|
| - .WillOnce(OnCloseNotification());
|
| notification_bridge_linux_->Close("", "");
|
| }
|
|
|