diff --git a/dom/workers/test/serviceworkers/match_all_advanced_worker.js b/dom/workers/test/serviceworkers/match_all_advanced_worker.js new file mode 100644 index 000000000000..3721aedfefc8 --- /dev/null +++ b/dom/workers/test/serviceworkers/match_all_advanced_worker.js @@ -0,0 +1,5 @@ +onmessage = function(e) { + self.clients.matchAll().then(function(clients) { + e.source.postMessage(clients.length); + }); +} diff --git a/dom/workers/test/serviceworkers/mochitest.ini b/dom/workers/test/serviceworkers/mochitest.ini index 85d49c817ada..8426b562ed77 100644 --- a/dom/workers/test/serviceworkers/mochitest.ini +++ b/dom/workers/test/serviceworkers/mochitest.ini @@ -18,6 +18,7 @@ support-files = sw_clients/simple.html sw_clients/service_worker_controlled.html match_all_worker.js + match_all_advanced_worker.js worker_unregister.js worker_update.js message_posting_worker.js @@ -51,6 +52,7 @@ support-files = [test_https_fetch.html] [test_https_fetch_cloned_response.html] [test_match_all.html] +[test_match_all_advanced.html] [test_install_event.html] [test_navigator.html] [test_scopes.html] diff --git a/dom/workers/test/serviceworkers/test_match_all_advanced.html b/dom/workers/test/serviceworkers/test_match_all_advanced.html new file mode 100644 index 000000000000..a8d47be030d1 --- /dev/null +++ b/dom/workers/test/serviceworkers/test_match_all_advanced.html @@ -0,0 +1,97 @@ + + + +
+