Bug 1058311 - Remove prefix for SWClients. Rename getServiced to matchAll. Add stub query options for matchAll r=baku
authorCatalin Badea <catalin.badea392@gmail.com>
Fri, 20 Feb 2015 17:16:17 +0200
changeset 229996 39354f436e2b7d5ecde0b7fbbdfbc1fe797c12be
parent 229995 a30cdc2cc8d856aa2e06a7d2fd7bc03c7cf8e05e
child 229997 f34ddbf1e4908fea90f4109875bfe9cddf3f4391
push id55864
push usercatalin.badea392@gmail.com
push dateFri, 20 Feb 2015 15:19:33 +0000
treeherdermozilla-inbound@39354f436e2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1058311
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1058311 - Remove prefix for SWClients. Rename getServiced to matchAll. Add stub query options for matchAll r=baku
dom/bindings/Bindings.conf
dom/webidl/Client.webidl
dom/webidl/Clients.webidl
dom/webidl/FetchEvent.webidl
dom/webidl/ServiceWorkerClient.webidl
dom/webidl/ServiceWorkerClients.webidl
dom/webidl/ServiceWorkerGlobalScope.webidl
dom/webidl/moz.build
dom/workers/ServiceWorkerClient.cpp
dom/workers/ServiceWorkerClients.cpp
dom/workers/ServiceWorkerClients.h
dom/workers/ServiceWorkerManager.cpp
dom/workers/ServiceWorkerManager.h
dom/workers/test/serviceworkers/get_serviced_worker.js
dom/workers/test/serviceworkers/match_all_worker.js
dom/workers/test/serviceworkers/message_posting_worker.js
dom/workers/test/serviceworkers/mochitest.ini
dom/workers/test/serviceworkers/sw_clients/service_worker_controlled.html
dom/workers/test/serviceworkers/sw_clients/simple.html
dom/workers/test/serviceworkers/test_get_serviced.html
dom/workers/test/serviceworkers/test_match_all.html
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -235,16 +235,26 @@ DOMInterfaces = {
     'concrete': False,
 },
 
 'ChromeWorker': {
     'headerFile': 'mozilla/dom/WorkerPrivate.h',
     'nativeType': 'mozilla::dom::workers::ChromeWorkerPrivate',
 },
 
+'Client': {
+    'nativeType': 'mozilla::dom::workers::ServiceWorkerClient',
+    'headerFile': 'mozilla/dom/workers/bindings/ServiceWorkerClient.h',
+},
+
+'Clients': {
+    'nativeType': 'mozilla::dom::workers::ServiceWorkerClients',
+    'headerFile': 'mozilla/dom/workers/bindings/ServiceWorkerClients.h',
+},
+
 'Console': {
     'implicitJSContext': [ 'trace', 'time', 'timeEnd' ],
 },
 
 'ConvolverNode': {
     'implicitJSContext': [ 'buffer' ],
 },
 
@@ -920,26 +930,16 @@ DOMInterfaces = {
     'nativeType': 'nsScreen',
 },
 
 'ServiceWorker': {
     'nativeType': 'mozilla::dom::workers::ServiceWorker',
     'headerFile': 'mozilla/dom/workers/bindings/ServiceWorker.h',
 },
 
-'ServiceWorkerClient': {
-    'nativeType': 'mozilla::dom::workers::ServiceWorkerClient',
-    'headerFile': 'mozilla/dom/workers/bindings/ServiceWorkerClient.h',
-},
-
-'ServiceWorkerClients': {
-    'nativeType': 'mozilla::dom::workers::ServiceWorkerClients',
-    'headerFile': 'mozilla/dom/workers/bindings/ServiceWorkerClients.h',
-},
-
 'ServiceWorkerGlobalScope': {
     'headerFile': 'mozilla/dom/WorkerScope.h',
     'workers': True,
 },
 
 'SharedWorker': {
     'nativeType': 'mozilla::dom::workers::SharedWorker',
     'headerFile': 'mozilla/dom/workers/bindings/SharedWorker.h',
rename from dom/webidl/ServiceWorkerClient.webidl
rename to dom/webidl/Client.webidl
--- a/dom/webidl/ServiceWorkerClient.webidl
+++ b/dom/webidl/Client.webidl
@@ -4,14 +4,14 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  *
  */
 
 [Exposed=ServiceWorker]
-interface ServiceWorkerClient {
+interface Client {
   readonly attribute unsigned long id;
 
   [Throws]
   void postMessage(any message, optional sequence<Transferable> transfer);
 };
rename from dom/webidl/ServiceWorkerClients.webidl
rename to dom/webidl/Clients.webidl
--- a/dom/webidl/ServiceWorkerClients.webidl
+++ b/dom/webidl/Clients.webidl
@@ -4,16 +4,27 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  *
  */
 
 [Exposed=ServiceWorker]
-interface ServiceWorkerClients {
+interface Clients {
   // A list of client objects, identifiable by ID, that correspond to windows
   // (or workers) that are "controlled" by this SW
   [Throws]
-  Promise<sequence<ServiceWorkerClient>?> getServiced();
-  [Throws]
-  Promise<any> reloadAll();
+  Promise<sequence<Client>?> matchAll(optional ClientQueryOptions options);
+};
+
+dictionary ClientQueryOptions {
+  boolean includeUncontrolled = false;
+  ClientType type = "window";
 };
+
+enum ClientType {
+  "window",
+  "worker",
+  "sharedworker",
+  "all"
+};
+
--- a/dom/webidl/FetchEvent.webidl
+++ b/dom/webidl/FetchEvent.webidl
@@ -7,21 +7,21 @@
  * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
  */
 
 [Constructor(DOMString type, optional FetchEventInit eventInitDict),
  Func="mozilla::dom::workers::ServiceWorkerVisible",
  Exposed=(ServiceWorker)]
 interface FetchEvent : Event {
   readonly attribute Request request;
-  readonly attribute ServiceWorkerClient client; // The window issuing the request.
+  readonly attribute Client client; // The window issuing the request.
   readonly attribute boolean isReload;
 
   [Throws] void respondWith(Promise<Response> r);
   Promise<Response> forwardTo(USVString url);
   Promise<Response> default();
 };
 
 dictionary FetchEventInit : EventInit {
   Request request;
-  ServiceWorkerClient client;
+  Client client;
   boolean isReload;
 };
--- a/dom/webidl/ServiceWorkerGlobalScope.webidl
+++ b/dom/webidl/ServiceWorkerGlobalScope.webidl
@@ -11,17 +11,17 @@
  */
 
 [Global=(Worker,ServiceWorker),
  Exposed=ServiceWorker]
 interface ServiceWorkerGlobalScope : WorkerGlobalScope {
   // FIXME(nsm): Bug 982725
   // readonly attribute CacheList caches;
 
-  readonly attribute ServiceWorkerClients clients;
+  readonly attribute Clients clients;
 
   [Unforgeable] readonly attribute DOMString scope;
 
   // FIXME(nsm): Bug 995484
   // ResponsePromise<any> fetch((Request or [EnsureUTF16] DOMString) request);
 
   void update();
 
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -65,16 +65,18 @@ WEBIDL_FILES = [
     'CanvasRenderingContext2D.webidl',
     'CaretPosition.webidl',
     'CDATASection.webidl',
     'ChannelMergerNode.webidl',
     'ChannelSplitterNode.webidl',
     'CharacterData.webidl',
     'ChildNode.webidl',
     'ChromeNotifications.webidl',
+    'Client.webidl',
+    'Clients.webidl',
     'ClipboardEvent.webidl',
     'CommandEvent.webidl',
     'Comment.webidl',
     'CompositionEvent.webidl',
     'Console.webidl',
     'Constraints.webidl',
     'Contacts.webidl',
     'ContainerBoxObject.webidl',
@@ -361,18 +363,16 @@ WEBIDL_FILES = [
     'RTCSessionDescription.webidl',
     'RTCStatsReport.webidl',
     'Screen.webidl',
     'ScriptProcessorNode.webidl',
     'ScrollAreaEvent.webidl',
     'ScrollBoxObject.webidl',
     'Selection.webidl',
     'ServiceWorker.webidl',
-    'ServiceWorkerClient.webidl',
-    'ServiceWorkerClients.webidl',
     'ServiceWorkerContainer.webidl',
     'ServiceWorkerGlobalScope.webidl',
     'ServiceWorkerRegistration.webidl',
     'SettingChangeNotification.webidl',
     'SettingsManager.webidl',
     'ShadowRoot.webidl',
     'SharedWorker.webidl',
     'SharedWorkerGlobalScope.webidl',
--- a/dom/workers/ServiceWorkerClient.cpp
+++ b/dom/workers/ServiceWorkerClient.cpp
@@ -5,17 +5,17 @@
  */
 
 #include "ServiceWorkerClient.h"
 
 #include "mozilla/dom/MessageEvent.h"
 #include "nsGlobalWindow.h"
 #include "WorkerPrivate.h"
 
-#include "mozilla/dom/ServiceWorkerClientBinding.h"
+#include "mozilla/dom/ClientBinding.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::workers;
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(ServiceWorkerClient, mOwner)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(ServiceWorkerClient)
@@ -24,17 +24,17 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(Service
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ServiceWorkerClient)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 JSObject*
 ServiceWorkerClient::WrapObject(JSContext* aCx)
 {
-  return ServiceWorkerClientBinding::Wrap(aCx, this);
+  return ClientBinding::Wrap(aCx, this);
 }
 
 namespace {
 
 class ServiceWorkerClientPostMessageRunnable MOZ_FINAL : public nsRunnable
 {
   uint64_t mId;
   JSAutoStructuredCloneBuffer mBuffer;
--- a/dom/workers/ServiceWorkerClients.cpp
+++ b/dom/workers/ServiceWorkerClients.cpp
@@ -1,24 +1,23 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "mozilla/dom/Promise.h"
+
 #include "ServiceWorkerClient.h"
 #include "ServiceWorkerClients.h"
 #include "ServiceWorkerManager.h"
 
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
 #include "WorkerScope.h"
 
-#include "mozilla/dom/Promise.h"
-#include "mozilla/dom/ServiceWorkerClientsBinding.h"
-
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::workers;
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(ServiceWorkerClients)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(ServiceWorkerClients)
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(ServiceWorkerClients, mWorkerScope)
 
@@ -31,26 +30,26 @@ ServiceWorkerClients::ServiceWorkerClien
   : mWorkerScope(aWorkerScope)
 {
   MOZ_ASSERT(mWorkerScope);
 }
 
 JSObject*
 ServiceWorkerClients::WrapObject(JSContext* aCx)
 {
-  return ServiceWorkerClientsBinding::Wrap(aCx, this);
+  return ClientsBinding::Wrap(aCx, this);
 }
 
 namespace {
 
 // Helper class used for passing the promise between threads while
 // keeping the worker alive.
 class PromiseHolder MOZ_FINAL : public WorkerFeature
 {
-  friend class GetServicedRunnable;
+  friend class MatchAllRunnable;
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PromiseHolder)
 
 public:
   PromiseHolder(WorkerPrivate* aWorkerPrivate,
                 Promise* aPromise)
     : mWorkerPrivate(aWorkerPrivate),
       mPromise(aPromise),
@@ -183,25 +182,25 @@ private:
 
     mPromiseHolder->Clean();
 
     return true;
   }
 
 };
 
-class GetServicedRunnable MOZ_FINAL : public nsRunnable
+class MatchAllRunnable MOZ_FINAL : public nsRunnable
 {
   WorkerPrivate* mWorkerPrivate;
   nsRefPtr<PromiseHolder> mPromiseHolder;
   nsCString mScope;
 public:
-  GetServicedRunnable(WorkerPrivate* aWorkerPrivate,
-                      PromiseHolder* aPromiseHolder,
-                      const nsCString& aScope)
+  MatchAllRunnable(WorkerPrivate* aWorkerPrivate,
+                   PromiseHolder* aPromiseHolder,
+                   const nsCString& aScope)
     : mWorkerPrivate(aWorkerPrivate),
       mPromiseHolder(aPromiseHolder),
       mScope(aScope)
   {
     MOZ_ASSERT(aWorkerPrivate);
     aWorkerPrivate->AssertIsOnWorkerThread();
   }
 
@@ -214,17 +213,17 @@ public:
     if (mPromiseHolder->mClean) {
       // Don't resolve the promise if it was already released.
       return NS_OK;
     }
 
     nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
     nsAutoPtr<nsTArray<uint64_t>> result(new nsTArray<uint64_t>());
 
-    swm->GetServicedClients(mScope, result);
+    swm->GetAllClients(mScope, result);
     nsRefPtr<ResolvePromiseWorkerRunnable> r =
       new ResolvePromiseWorkerRunnable(mWorkerPrivate, mPromiseHolder, result);
 
     AutoSafeJSContext cx;
     if (r->Dispatch(cx)) {
       return NS_OK;
     }
 
@@ -239,54 +238,47 @@ public:
 
     return NS_OK;
   }
 };
 
 } // anonymous namespace
 
 already_AddRefed<Promise>
-ServiceWorkerClients::GetServiced(ErrorResult& aRv)
+ServiceWorkerClients::MatchAll(const ClientQueryOptions& aOptions,
+                               ErrorResult& aRv)
 {
   WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
   MOZ_ASSERT(workerPrivate);
   workerPrivate->AssertIsOnWorkerThread();
 
   nsString scope;
   mWorkerScope->GetScope(scope);
 
+  if (aOptions.mIncludeUncontrolled || aOptions.mType != ClientType::Window) {
+    aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+    return nullptr;
+  }
+
   nsRefPtr<Promise> promise = Promise::Create(mWorkerScope, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   nsRefPtr<PromiseHolder> promiseHolder = new PromiseHolder(workerPrivate,
                                                             promise);
   if (!promiseHolder->GetPromise()) {
     // Don't dispatch if adding the worker feature failed.
     return promise.forget();
   }
 
-  nsRefPtr<GetServicedRunnable> r =
-    new GetServicedRunnable(workerPrivate,
-                            promiseHolder,
-                            NS_ConvertUTF16toUTF8(scope));
+  nsRefPtr<MatchAllRunnable> r =
+    new MatchAllRunnable(workerPrivate,
+                         promiseHolder,
+                         NS_ConvertUTF16toUTF8(scope));
   nsresult rv = NS_DispatchToMainThread(r);
 
   if (NS_WARN_IF(NS_FAILED(rv))) {
     promise->MaybeReject(NS_ERROR_NOT_AVAILABLE);
   }
 
   return promise.forget();
 }
-
-// FIXME(catalinb): Bug 1045257 - Implement ReloadAll
-already_AddRefed<Promise>
-ServiceWorkerClients::ReloadAll(ErrorResult& aRv)
-{
-  nsRefPtr<Promise> promise = Promise::Create(mWorkerScope, aRv);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return nullptr;
-  }
-  promise->MaybeReject(NS_ERROR_NOT_AVAILABLE);
-  return promise.forget();
-}
-
--- a/dom/workers/ServiceWorkerClients.h
+++ b/dom/workers/ServiceWorkerClients.h
@@ -4,43 +4,43 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 #ifndef mozilla_dom_workers_serviceworkerclients_h
 #define mozilla_dom_workers_serviceworkerclients_h
 
 #include "nsAutoPtr.h"
 #include "nsWrapperCache.h"
+
 #include "mozilla/dom/WorkerScope.h"
+#include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/ClientsBinding.h"
+#include "mozilla/ErrorResult.h"
 
 namespace mozilla {
-
-class ErrorResult;
-
 namespace dom {
-
-class Promise;
-
 namespace workers {
 
 class ServiceWorkerClients MOZ_FINAL : public nsISupports,
                                        public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ServiceWorkerClients)
 
   explicit ServiceWorkerClients(ServiceWorkerGlobalScope* aWorkerScope);
 
-  already_AddRefed<Promise> GetServiced(ErrorResult& aRv);
-  already_AddRefed<Promise> ReloadAll(ErrorResult& aRv);
+  already_AddRefed<Promise>
+  MatchAll(const ClientQueryOptions& aOptions, ErrorResult& aRv);
 
-  JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+  JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
-  ServiceWorkerGlobalScope* GetParentObject() const
+  ServiceWorkerGlobalScope*
+  GetParentObject() const
   {
     return mWorkerScope;
   }
 
 private:
   ~ServiceWorkerClients()
   {
   }
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -2632,18 +2632,18 @@ FireControllerChangeOnMatchingDocument(n
     NS_WARNING("Failed to dispatch controllerchange event");
   }
 
   return PL_DHASH_NEXT;
 }
 } // anonymous namespace
 
 void
-ServiceWorkerManager::GetServicedClients(const nsCString& aScope,
-                                     nsTArray<uint64_t>* aControlledDocuments)
+ServiceWorkerManager::GetAllClients(const nsCString& aScope,
+                                    nsTArray<uint64_t>* aControlledDocuments)
 {
   nsRefPtr<ServiceWorkerRegistrationInfo> registration = GetRegistration(aScope);
 
   if (!registration) {
     // The registration was removed, leave the array empty.
     return;
   }
 
--- a/dom/workers/ServiceWorkerManager.h
+++ b/dom/workers/ServiceWorkerManager.h
@@ -375,18 +375,18 @@ public:
               nsString aMessage,
               nsString aFilename,
               nsString aLine,
               uint32_t aLineNumber,
               uint32_t aColumnNumber,
               uint32_t aFlags);
 
   void
-  GetServicedClients(const nsCString& aScope,
-                     nsTArray<uint64_t>* aControlledDocuments);
+  GetAllClients(const nsCString& aScope,
+                nsTArray<uint64_t>* aControlledDocuments);
 
   static already_AddRefed<ServiceWorkerManager>
   GetInstance();
 
  void LoadRegistrations(
                  const nsTArray<ServiceWorkerRegistrationData>& aRegistrations);
 
 private:
deleted file mode 100644
--- a/dom/workers/test/serviceworkers/get_serviced_worker.js
+++ /dev/null
@@ -1,10 +0,0 @@
-function loop() {
-  self.clients.getServiced().then(function(result) {
-    setTimeout(loop, 0);
-  });
-}
-
-onactivate = function(e) {
-  // spam getServiced until the worker is closed.
-  loop();
-}
new file mode 100644
--- /dev/null
+++ b/dom/workers/test/serviceworkers/match_all_worker.js
@@ -0,0 +1,10 @@
+function loop() {
+  self.clients.matchAll().then(function(result) {
+    setTimeout(loop, 0);
+  });
+}
+
+onactivate = function(e) {
+  // spam matchAll until the worker is closed.
+  loop();
+}
--- a/dom/workers/test/serviceworkers/message_posting_worker.js
+++ b/dom/workers/test/serviceworkers/message_posting_worker.js
@@ -1,8 +1,8 @@
 onmessage = function(e) {
-  self.clients.getServiced().then(function(res) {
+  self.clients.matchAll().then(function(res) {
     if (!res.length) {
       dump("ERROR: no clients are currently controlled.\n");
     }
     res[0].postMessage(e.data);
   });
 };
--- a/dom/workers/test/serviceworkers/mochitest.ini
+++ b/dom/workers/test/serviceworkers/mochitest.ini
@@ -12,29 +12,29 @@ support-files =
   simpleregister/index.html
   simpleregister/ready.html
   controller/index.html
   unregister/index.html
   unregister/unregister.html
   workerUpdate/update.html
   sw_clients/simple.html
   sw_clients/service_worker_controlled.html
-  get_serviced_worker.js
+  match_all_worker.js
   worker_unregister.js
   worker_update.js
   message_posting_worker.js
   fetch/index.html
   fetch/fetch_worker_script.js
   fetch/fetch_tests.js
 
 [test_unregister.html]
 skip-if = true # Bug 1133805
 [test_installation_simple.html]
 [test_fetch_event.html]
-[test_get_serviced.html]
+[test_match_all.html]
 [test_install_event.html]
 [test_navigator.html]
 [test_scopes.html]
 [test_controller.html]
 [test_workerUpdate.html]
 skip-if = true # Bug 1133805
 [test_workerUnregister.html]
 skip-if = true # Bug 1133805
--- a/dom/workers/test/serviceworkers/sw_clients/service_worker_controlled.html
+++ b/dom/workers/test/serviceworkers/sw_clients/service_worker_controlled.html
@@ -2,17 +2,17 @@
   Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>controlled page</title>
   <!--
-    Paged controlled by a service worker for testing getServiced().
+    Paged controlled by a service worker for testing matchAll().
     See bug 982726, 1058311.
   -->
 <script class="testbody" type="text/javascript">
   function fail(msg) {
     info("service_worker_controlled.html: " + msg);
     opener.postMessage("FAIL", "*");
   }
 
--- a/dom/workers/test/serviceworkers/sw_clients/simple.html
+++ b/dom/workers/test/serviceworkers/sw_clients/simple.html
@@ -1,16 +1,16 @@
 <!--
   Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <!DOCTYPE HTML>
 <html>
 <head>
-  <title>Bug 982726 - test get_serviced not crashing</title>
+  <title>Bug 982726 - test match_all not crashing</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 <pre id="test"></pre>
 <script class="testbody" type="text/javascript">
rename from dom/workers/test/serviceworkers/test_get_serviced.html
rename to dom/workers/test/serviceworkers/test_match_all.html
--- a/dom/workers/test/serviceworkers/test_get_serviced.html
+++ b/dom/workers/test/serviceworkers/test_match_all.html
@@ -1,32 +1,32 @@
 <!--
   Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/
 -->
 <!DOCTYPE HTML>
 <html>
 <head>
-  <title>Bug 982726 - test get_serviced not crashing</title>
+  <title>Bug 982726 - test match_all not crashing</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 <pre id="test"></pre>
 <script class="testbody" type="text/javascript">
-  // get_serviced_worker will call getServiced until the worker shuts down.
+  // match_all_worker will call matchAll until the worker shuts down.
   // Test passes if the browser doesn't crash on leaked promise objects.
   var registration;
   var content;
   var iframe;
 
   function simpleRegister() {
-    return navigator.serviceWorker.register("get_serviced_worker.js",
+    return navigator.serviceWorker.register("match_all_worker.js",
                                             { scope: "./sw_clients/" })
       .then((swr) => registration = swr);
   }
 
   function closeAndUnregister() {
     content.removeChild(iframe);
 
     return registration.unregister().then(function(result) {
@@ -55,17 +55,17 @@
 
   function runTest() {
     simpleRegister()
       .then(openClient)
       .then(closeAndUnregister)
       .catch(function(e) {
         ok(false, "Some test failed with error " + e);
       }).then(function() {
-        ok(true, "Didn't crash on resolving getServiced promises while worker shuts down.");
+        ok(true, "Didn't crash on resolving matchAll promises while worker shuts down.");
         SimpleTest.finish();
       });
   }
 
   SimpleTest.waitForExplicitFinish();
   SpecialPowers.pushPrefEnv({"set": [
     ["dom.serviceWorkers.enabled", true],
     ["dom.serviceWorkers.testing.enabled", true]