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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html

Issue 2777183002: Hook up the other Background Fetch Mojo methods with the system (Closed)
Patch Set: Hook up the other Background Fetch Mojo methods with the system Created 3 years, 9 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/background_fetch/background-fetch-manager-getTags.https.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html
index bee0cc8833dc117eabcfe68ef34ef855569968f7..381d68dc57ccc9c8e7275e4089fa735d619d9003 100644
--- a/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html
+++ b/third_party/WebKit/LayoutTests/http/tests/background_fetch/background-fetch-manager-getTags.https.html
@@ -43,4 +43,26 @@ promise_test(function(test) {
});
}, 'BackgroundFetchManager.getTags() returns an empty sequence by default.');
+
+promise_test(function(test) {
+ const tags = ['first-tag', 'second-tag', 'third-tag'];
+
+ let registration = null;
+
+ return service_worker_unregister_and_register(test, workerUrl, scope)
+ .then(r => {
+ registration = r;
+ return wait_for_state(test, r.installing, 'activated');
+ })
+ .then(() => {
+ return Promise.all(
+ tags.map(tag => registration.backgroundFetch.fetch(tag, ['resources/non-existing-file.png'])));
+ })
+ .then(() => registration.backgroundFetch.getTags())
+ .then(receivedTags => {
+ assert_array_equals(receivedTags, tags);
+ });
+
+}, 'BackgroundFetchManager.getTags() returns a sequence of active fetches.');
+
</script>

Powered by Google App Engine
This is Rietveld 408576698