Bug 1140120 - Remove a couple of unused test functions on ServiceWorkerContainer; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 05 Mar 2015 16:56:08 -0500
changeset 232289 a3e39b781d24dd42d0e0cfdbc54b4244f88a978e
parent 232288 43d4db7da2d6b7840abf3aea5a0e84df4e0789ae
child 232290 dccc995ad9c1aba55cb05dd8a43798aa71af0926
push id28375
push userryanvm@gmail.com
push dateFri, 06 Mar 2015 21:23:20 +0000
treeherdermozilla-central@43fb1f92e8d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1140120
milestone39.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 1140120 - Remove a couple of unused test functions on ServiceWorkerContainer; r=baku
dom/webidl/ServiceWorkerContainer.webidl
dom/workers/ServiceWorkerContainer.cpp
dom/workers/ServiceWorkerContainer.h
--- a/dom/webidl/ServiceWorkerContainer.webidl
+++ b/dom/webidl/ServiceWorkerContainer.webidl
@@ -33,20 +33,14 @@ interface ServiceWorkerContainer : Event
   attribute EventHandler onreloadpage;
   attribute EventHandler onerror;
   attribute EventHandler onmessage;
 };
 
 // Testing only.
 partial interface ServiceWorkerContainer {
   [Throws,Pref="dom.serviceWorkers.testing.enabled"]
-  Promise<any> clearAllServiceWorkerData();
-
-  [Throws,Pref="dom.serviceWorkers.testing.enabled"]
   DOMString getScopeForUrl(DOMString url);
-
-  [Throws,Pref="dom.serviceWorkers.testing.enabled"]
-  DOMString getControllingWorkerScriptURLForPath(DOMString path);
 };
 
 dictionary RegistrationOptionList {
   USVString scope = "/";
 };
--- a/dom/workers/ServiceWorkerContainer.cpp
+++ b/dom/workers/ServiceWorkerContainer.cpp
@@ -177,41 +177,24 @@ ServiceWorkerContainer::GetReady(ErrorRe
   nsCOMPtr<nsISupports> promise;
   aRv = swm->GetReadyPromise(GetOwner(), getter_AddRefs(promise));
 
   mReadyPromise = static_cast<Promise*>(promise.get());
   return mReadyPromise;
 }
 
 // Testing only.
-already_AddRefed<Promise>
-ServiceWorkerContainer::ClearAllServiceWorkerData(ErrorResult& aRv)
-{
-  aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
-  return nullptr;
-}
-
-// Testing only.
 void
 ServiceWorkerContainer::GetScopeForUrl(const nsAString& aUrl,
                                        nsString& aScope,
                                        ErrorResult& aRv)
 {
   nsCOMPtr<nsIServiceWorkerManager> swm = mozilla::services::GetServiceWorkerManager();
   if (!swm) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aRv = swm->GetScopeForUrl(aUrl, aScope);
 }
 
-// Testing only.
-void
-ServiceWorkerContainer::GetControllingWorkerScriptURLForPath(
-                                                        const nsAString& aPath,
-                                                        nsString& aScriptURL,
-                                                        ErrorResult& aRv)
-{
-  aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
-}
 } // namespace dom
 } // namespace mozilla
--- a/dom/workers/ServiceWorkerContainer.h
+++ b/dom/workers/ServiceWorkerContainer.h
@@ -52,29 +52,19 @@ public:
 
   already_AddRefed<Promise>
   GetRegistrations(ErrorResult& aRv);
 
   Promise*
   GetReady(ErrorResult& aRv);
 
   // Testing only.
-  already_AddRefed<Promise>
-  ClearAllServiceWorkerData(ErrorResult& aRv);
-
-  // Testing only.
   void
   GetScopeForUrl(const nsAString& aUrl, nsString& aScope, ErrorResult& aRv);
 
-  // Testing only.
-  void
-  GetControllingWorkerScriptURLForPath(const nsAString& aPath,
-                                       nsString& aScriptURL,
-                                       ErrorResult& aRv);
-
   // DOMEventTargetHelper
   void DisconnectFromOwner() MOZ_OVERRIDE;
 
 private:
   ~ServiceWorkerContainer();
 
   void RemoveReadyPromise();