Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/sw-test-helpers.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/sw-test-helpers.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/sw-test-helpers.js |
index 3f81a544f3f02181e3d460f994b63af897902da1..974416ef6011b52bb0ea1d42a82f1694ff2ba290 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/sw-test-helpers.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/sw-test-helpers.js |
@@ -61,6 +61,9 @@ self.synthesizeNotificationClick = function() { |
var handler = function(e) { |
resolve(e); |
+ // To allow waitUntil to be called inside execution of the microtask |
+ // enqueued by above resolve function. |
+ e.waitUntil(Promise.resolve()); |
e.notification.close(); |
self.removeEventListener('notificationclick', handler); |
}; |