| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/notifications/notification_platform_bridge_linux.h" | 5 #include "chrome/browser/notifications/notification_platform_bridge_linux.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 base::Callback<void(dbus::Signal*)> notification_closed_callback_; | 175 base::Callback<void(dbus::Signal*)> notification_closed_callback_; |
| 176 | 176 |
| 177 std::unique_ptr<NotificationPlatformBridgeLinux> notification_bridge_linux_; | 177 std::unique_ptr<NotificationPlatformBridgeLinux> notification_bridge_linux_; |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeLinuxTest); | 180 DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeLinuxTest); |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 TEST_F(NotificationPlatformBridgeLinuxTest, SetUpAndTearDown) {} | 183 TEST_F(NotificationPlatformBridgeLinuxTest, SetUpAndTearDown) {} |
| 184 | 184 |
| 185 TEST_F(NotificationPlatformBridgeLinuxTest, NotifyAndCloseFormat) { | 185 // Frequently triggers a data race. Disabled as flaky: https://crbug.com/719485 |
| 186 TEST_F(NotificationPlatformBridgeLinuxTest, DISABLED_NotifyAndCloseFormat) { |
| 186 EXPECT_CALL(*mock_notification_proxy_.get(), | 187 EXPECT_CALL(*mock_notification_proxy_.get(), |
| 187 MockCallMethodAndBlock(Calls("Notify"), _)) | 188 MockCallMethodAndBlock(Calls("Notify"), _)) |
| 188 .WillOnce(OnNotify(1)); | 189 .WillOnce(OnNotify(1)); |
| 189 notification_bridge_linux_->Display(NotificationCommon::PERSISTENT, "", "", | 190 notification_bridge_linux_->Display(NotificationCommon::PERSISTENT, "", "", |
| 190 false, | 191 false, |
| 191 CreateNotification("id1", "", "", "")); | 192 CreateNotification("id1", "", "", "")); |
| 192 | 193 |
| 193 EXPECT_CALL(*mock_notification_proxy_.get(), | 194 EXPECT_CALL(*mock_notification_proxy_.get(), |
| 194 MockCallMethodAndBlock(Calls("CloseNotification"), _)) | 195 MockCallMethodAndBlock(Calls("CloseNotification"), _)) |
| 195 .WillOnce(OnCloseNotification()); | 196 .WillOnce(OnCloseNotification()); |
| 196 notification_bridge_linux_->Close("", ""); | 197 notification_bridge_linux_->Close("", ""); |
| 197 } | 198 } |
| OLD | NEW |