Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js

Issue 1909043003: Tests that notification resource requests are handled by onfetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NotificationTestsUsePromises
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js b/third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js
index d9fb5a297c918da802fdda4a481b347cbe25e9b5..3bbb2217bbc1bf7bdaacff04ca894ed30050229b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/notifications/resources/test-helpers.js
@@ -101,3 +101,13 @@ function simulateNotificationClick(title, actionIndex, port)
});
});
}
+
+function listenOnce(target, type)
Peter Beverloo 2016/04/21 17:27:00 ++docs
Michael van Ouwerkerk 2016/04/22 13:24:09 Done.
+{
+ return new Promise((resolve, reject) => {
+ target.addEventListener(type, function listener(event) {
+ target.removeEventListener(type, listener);
+ resolve(event);
+ });
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698