| 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 89cc356e971d1800c3a0378f9e4526bbdb997b28..8e99ede63d740a2419aa9fdee1951fd2ecb6f86b 100644
|
| --- a/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| +++ b/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc
|
| @@ -53,11 +53,21 @@ class NotificationBuilder {
|
| return *this;
|
| }
|
|
|
| + NotificationBuilder& SetMessage(const base::string16& message) {
|
| + notification_.set_message(message);
|
| + return *this;
|
| + }
|
| +
|
| NotificationBuilder& SetNeverTimeout(bool never_timeout) {
|
| notification_.set_never_timeout(never_timeout);
|
| return *this;
|
| }
|
|
|
| + NotificationBuilder& SetOriginUrl(const GURL& origin_url) {
|
| + notification_.set_origin_url(origin_url);
|
| + return *this;
|
| + }
|
| +
|
| NotificationBuilder& SetProgress(int progress) {
|
| notification_.set_progress(progress);
|
| return *this;
|
| @@ -329,3 +339,21 @@ TEST_F(NotificationPlatformBridgeLinuxTest, NotificationTimeouts) {
|
| NotificationCommon::PERSISTENT, "", "", false,
|
| NotificationBuilder("2").SetNeverTimeout(true).GetResult());
|
| }
|
| +
|
| +TEST_F(NotificationPlatformBridgeLinuxTest, NotificationAttribution) {
|
| + EXPECT_CALL(*mock_notification_proxy_.get(),
|
| + MockCallMethodAndBlock(Calls("Notify"), _))
|
| + .WillOnce(OnNotify(
|
| + [](const NotificationRequest& request) {
|
| + EXPECT_EQ("Body text\ngoogle.com", request.body);
|
| + },
|
| + 1));
|
| +
|
| + CreateNotificationBridgeLinux();
|
| + notification_bridge_linux_->Display(
|
| + NotificationCommon::PERSISTENT, "", "", false,
|
| + NotificationBuilder("")
|
| + .SetMessage(base::UTF8ToUTF16("Body text"))
|
| + .SetOriginUrl(GURL("https://google.com/"))
|
| + .GetResult());
|
| +}
|
|
|