Index: chrome/browser/notifications/platform_notification_service_unittest.cc |
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc |
index 322c55e2083d9008a2d279e0ac4180262b203bfd..32f2546677dc9713b8199b9ad929493173d8ba48 100644 |
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc |
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/strings/utf_string_conversions.h" |
+#include "base/threading/platform_thread.h" |
#include "base/time/time.h" |
#include "chrome/browser/notifications/notification_test_util.h" |
#include "chrome/browser/notifications/platform_notification_service_impl.h" |
@@ -202,6 +203,9 @@ TEST_F(PlatformNotificationServiceTest, NotificationPermissionLastUsage) { |
origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
EXPECT_GT(after_page_notification, begin_time); |
+ // Ensure that there is at least some time between the two calls. |
+ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1)); |
+ |
service()->DisplayPersistentNotification(profile(), |
42 /* sw_registration_id */, |
origin, |