Bug 1306772 - Remove DOM/cellbroadcast and related code. draft
authorMichelangelo De Simone <mdesimone@mozilla.com>
Fri, 30 Sep 2016 16:03:21 -0700
changeset 420789 b6ec2f0daaa5a5a1ce3ea7ec07f119f413010a53
parent 420680 42c95d88aaaa7c2eca1d278399421d437441ac4d
child 420874 52baf6dd4f9e9d50a580b24baeb68dd684547806
child 420875 e86d948376280171955056cb2c9d8b63752da685
child 420876 389ce79226657fc3c001e10b9c76c993e28b3f39
child 420877 b4f87fa9fad8f2e9d38a8dd974474453fe98c6dd
child 420880 03601a025adb92c4e1b260ba1312da0ad32688e6
push id31294
push usermdesimone@mozilla.com
push dateTue, 04 Oct 2016 17:31:48 +0000
bugs1306772
milestone52.0a1
Bug 1306772 - Remove DOM/cellbroadcast and related code. MozReview-Commit-ID: EWBjamnhAyC
browser/installer/package-manifest.in
dom/apps/PermissionsTable.jsm
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/bindings/Bindings.conf
dom/cellbroadcast/CellBroadcast.cpp
dom/cellbroadcast/CellBroadcast.h
dom/cellbroadcast/CellBroadcastMessage.cpp
dom/cellbroadcast/CellBroadcastMessage.h
dom/cellbroadcast/gonk/CellBroadcastService.js
dom/cellbroadcast/gonk/CellBroadcastService.manifest
dom/cellbroadcast/interfaces/moz.build
dom/cellbroadcast/interfaces/nsICellBroadcastService.idl
dom/cellbroadcast/interfaces/nsICellbroadcastMessenger.idl
dom/cellbroadcast/interfaces/nsIGonkCellBroadcastService.idl
dom/cellbroadcast/ipc/CellBroadcastIPCService.cpp
dom/cellbroadcast/ipc/CellBroadcastIPCService.h
dom/cellbroadcast/ipc/CellBroadcastParent.cpp
dom/cellbroadcast/ipc/CellBroadcastParent.h
dom/cellbroadcast/ipc/PCellBroadcast.ipdl
dom/cellbroadcast/moz.build
dom/cellbroadcast/tests/marionette/head.js
dom/cellbroadcast/tests/marionette/manifest.ini
dom/cellbroadcast/tests/marionette/test_cellbroadcast_etws.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm_language_and_body.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_multi_sim.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js
dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts_language_and_body.js
dom/events/test/test_all_synthetic_events.html
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
dom/moz.build
dom/permission/tests/test_cellbroadcast.html
dom/webidl/MozCellBroadcast.webidl
dom/webidl/MozCellBroadcastEvent.webidl
dom/webidl/MozCellBroadcastMessage.webidl
dom/webidl/Navigator.webidl
dom/webidl/moz.build
layout/build/nsLayoutModule.cpp
modules/libpref/init/all.js
testing/marionette/harness/marionette/tests/webapi-tests.ini
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -203,17 +203,16 @@
 @RESPATH@/components/dom_power.xpt
 @RESPATH@/components/dom_push.xpt
 @RESPATH@/components/dom_quota.xpt
 @RESPATH@/components/dom_range.xpt
 @RESPATH@/components/dom_security.xpt
 @RESPATH@/components/dom_settings.xpt
 @RESPATH@/components/dom_permissionsettings.xpt
 @RESPATH@/components/dom_sidebar.xpt
-@RESPATH@/components/dom_cellbroadcast.xpt
 @RESPATH@/components/dom_mobilemessage.xpt
 @RESPATH@/components/dom_storage.xpt
 @RESPATH@/components/dom_stylesheets.xpt
 @RESPATH@/components/dom_telephony.xpt
 @RESPATH@/components/dom_traversal.xpt
 @RESPATH@/components/dom_tv.xpt
 @RESPATH@/components/dom_voicemail.xpt
 #ifdef MOZ_WEBSPEECH
--- a/dom/apps/PermissionsTable.jsm
+++ b/dom/apps/PermissionsTable.jsm
@@ -278,21 +278,16 @@ this.PermissionsTable =  { geolocation: 
                              privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION
                            },
                            "background-sensors": {
                              app: DENY_ACTION,
                              privileged: DENY_ACTION,
                              certified: ALLOW_ACTION
                            },
-                           cellbroadcast: {
-                             app: DENY_ACTION,
-                             privileged: DENY_ACTION,
-                             certified: ALLOW_ACTION
-                           },
                            "audio-channel-normal": {
                              app: ALLOW_ACTION,
                              privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION
                            },
                            "audio-channel-content": {
                              app: ALLOW_ACTION,
                              privileged: ALLOW_ACTION,
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -33,17 +33,16 @@
 #include "BatteryManager.h"
 #include "mozilla/dom/DeviceStorageAreaListener.h"
 #ifdef MOZ_GAMEPAD
 #include "mozilla/dom/GamepadServiceTest.h"
 #endif
 #include "mozilla/dom/PowerManager.h"
 #include "mozilla/dom/WakeLock.h"
 #include "mozilla/dom/power/PowerManagerService.h"
-#include "mozilla/dom/CellBroadcast.h"
 #include "mozilla/dom/FlyWebPublishedServer.h"
 #include "mozilla/dom/FlyWebService.h"
 #include "mozilla/dom/IccManager.h"
 #include "mozilla/dom/InputPortManager.h"
 #include "mozilla/dom/MobileMessageManager.h"
 #include "mozilla/dom/Permissions.h"
 #include "mozilla/dom/Presentation.h"
 #include "mozilla/dom/ServiceWorkerContainer.h"
@@ -218,17 +217,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMimeTypes)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPlugins)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPermissions)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGeolocation)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mNotification)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryPromise)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPowerManager)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIccManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileMessageManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTVManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mInputPortManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStorageManager)
@@ -301,20 +299,16 @@ Navigator::Invalidate()
   }
 #endif
 
   if (mPowerManager) {
     mPowerManager->Shutdown();
     mPowerManager = nullptr;
   }
 
-  if (mCellBroadcast) {
-    mCellBroadcast = nullptr;
-  }
-
   if (mIccManager) {
     mIccManager->Shutdown();
     mIccManager = nullptr;
   }
 
   if (mMobileMessageManager) {
     mMobileMessageManager->Shutdown();
     mMobileMessageManager = nullptr;
@@ -1765,30 +1759,16 @@ Navigator::GetMozMobileConnections(Error
     mMobileConnections = new MobileConnectionArray(mWindow);
   }
 
   return mMobileConnections;
 }
 
 #endif // MOZ_B2G_RIL
 
-CellBroadcast*
-Navigator::GetMozCellBroadcast(ErrorResult& aRv)
-{
-  if (!mCellBroadcast) {
-    if (!mWindow) {
-      aRv.Throw(NS_ERROR_UNEXPECTED);
-      return nullptr;
-    }
-    mCellBroadcast = CellBroadcast::Create(mWindow, aRv);
-  }
-
-  return mCellBroadcast;
-}
-
 Voicemail*
 Navigator::GetMozVoicemail(ErrorResult& aRv)
 {
   if (!mVoicemail) {
     if (!mWindow) {
       aRv.Throw(NS_ERROR_UNEXPECTED);
       return nullptr;
     }
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -84,17 +84,16 @@ class BluetoothManager;
 } // namespace bluetooth
 #endif // MOZ_B2G_BT
 
 #ifdef MOZ_B2G_RIL
 class MobileConnectionArray;
 #endif
 
 class PowerManager;
-class CellBroadcast;
 class IccManager;
 class Telephony;
 class Voicemail;
 class TVManager;
 class InputPortManager;
 class DeviceStorageAreaListener;
 class Presentation;
 class LegacyMozTCPSocket;
@@ -224,17 +223,16 @@ public:
                          nsTArray<RefPtr<nsDOMDeviceStorage> >& aStores,
                          ErrorResult& aRv);
 
   already_AddRefed<nsDOMDeviceStorage>
   GetDeviceStorageByNameAndType(const nsAString& aName, const nsAString& aType,
                                 ErrorResult& aRv);
 
   DesktopNotificationCenter* GetMozNotification(ErrorResult& aRv);
-  CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv);
   IccManager* GetMozIccManager(ErrorResult& aRv);
   MobileMessageManager* GetMozMobileMessage();
   Telephony* GetMozTelephony(ErrorResult& aRv);
   Voicemail* GetMozVoicemail(ErrorResult& aRv);
   TVManager* GetTv();
   InputPortManager* GetInputPortManager(ErrorResult& aRv);
   already_AddRefed<LegacyMozTCPSocket> MozTCPSocket();
   network::Connection* GetConnection(ErrorResult& aRv);
@@ -341,17 +339,16 @@ private:
   RefPtr<Geolocation> mGeolocation;
   RefPtr<DesktopNotificationCenter> mNotification;
   RefPtr<battery::BatteryManager> mBatteryManager;
   RefPtr<Promise> mBatteryPromise;
 #ifdef MOZ_B2G_FM
   RefPtr<FMRadio> mFMRadio;
 #endif
   RefPtr<PowerManager> mPowerManager;
-  RefPtr<CellBroadcast> mCellBroadcast;
   RefPtr<IccManager> mIccManager;
   RefPtr<MobileMessageManager> mMobileMessageManager;
   RefPtr<Telephony> mTelephony;
   RefPtr<Voicemail> mVoicemail;
   RefPtr<TVManager> mTVManager;
   RefPtr<InputPortManager> mInputPortManager;
   RefPtr<network::Connection> mConnection;
 #ifdef MOZ_B2G_RIL
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -687,29 +687,16 @@ DOMInterfaces = {
     'notflattened': True
 },
 
 'MozCdmaIccInfo': {
     'headerFile': 'mozilla/dom/IccInfo.h',
     'nativeType': 'mozilla::dom::CdmaIccInfo',
 },
 
-'MozCellBroadcast': {
-    'nativeType': 'mozilla::dom::CellBroadcast',
-},
-
-'MozCellBroadcastEtwsInfo': {
-    'nativeType': 'mozilla::dom::CellBroadcastEtwsInfo',
-    'headerFile': 'CellBroadcastMessage.h'
-},
-
-'MozCellBroadcastMessage': {
-    'nativeType': 'mozilla::dom::CellBroadcastMessage',
-},
-
 'MozGsmIccInfo': {
     'headerFile': 'mozilla/dom/IccInfo.h',
     'nativeType': 'mozilla::dom::GsmIccInfo',
 },
 
 'MozIcc': {
     'nativeType': 'mozilla::dom::Icc',
 },
deleted file mode 100644
--- a/dom/cellbroadcast/CellBroadcast.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/CellBroadcast.h"
-#include "mozilla/dom/CellBroadcastMessage.h"
-#include "mozilla/dom/MozCellBroadcastBinding.h"
-#include "mozilla/dom/MozCellBroadcastEvent.h"
-#include "nsServiceManagerUtils.h"
-
-// Service instantiation
-#include "ipc/CellBroadcastIPCService.h"
-#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
-#include "nsIGonkCellBroadcastService.h"
-#endif
-#include "nsXULAppAPI.h" // For XRE_GetProcessType()
-
-using namespace mozilla::dom;
-using mozilla::ErrorResult;
-
-/**
- * CellBroadcast::Listener Implementation.
- */
-
-class CellBroadcast::Listener final : public nsICellBroadcastListener
-{
-private:
-  CellBroadcast* mCellBroadcast;
-
-public:
-  NS_DECL_ISUPPORTS
-  NS_FORWARD_SAFE_NSICELLBROADCASTLISTENER(mCellBroadcast)
-
-  explicit Listener(CellBroadcast* aCellBroadcast)
-    : mCellBroadcast(aCellBroadcast)
-  {
-    MOZ_ASSERT(mCellBroadcast);
-  }
-
-  void Disconnect()
-  {
-    MOZ_ASSERT(mCellBroadcast);
-    mCellBroadcast = nullptr;
-  }
-
-private:
-  ~Listener()
-  {
-    MOZ_ASSERT(!mCellBroadcast);
-  }
-};
-
-NS_IMPL_ISUPPORTS(CellBroadcast::Listener, nsICellBroadcastListener)
-
-/**
- * CellBroadcast Implementation.
- */
-
-// static
-already_AddRefed<CellBroadcast>
-CellBroadcast::Create(nsPIDOMWindowInner* aWindow, ErrorResult& aRv)
-{
-  MOZ_ASSERT(aWindow);
-  MOZ_ASSERT(aWindow->IsInnerWindow());
-
-  nsCOMPtr<nsICellBroadcastService> service =
-    do_GetService(CELLBROADCAST_SERVICE_CONTRACTID);
-  if (!service) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return nullptr;
-  }
-
-  RefPtr<CellBroadcast> cb = new CellBroadcast(aWindow, service);
-  return cb.forget();
-}
-
-CellBroadcast::CellBroadcast(nsPIDOMWindowInner* aWindow,
-                             nsICellBroadcastService* aService)
-  : DOMEventTargetHelper(aWindow)
-{
-  mListener = new Listener(this);
-  DebugOnly<nsresult> rv = aService->RegisterListener(mListener);
-  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
-                       "Failed registering Cell Broadcast callback");
-}
-
-CellBroadcast::~CellBroadcast()
-{
-  MOZ_ASSERT(mListener);
-
-  mListener->Disconnect();
-  nsCOMPtr<nsICellBroadcastService> service =
-    do_GetService(CELLBROADCAST_SERVICE_CONTRACTID);
-  if (service) {
-    service->UnregisterListener(mListener);
-  }
-
-  mListener = nullptr;
-}
-
-NS_IMPL_ISUPPORTS_INHERITED0(CellBroadcast, DOMEventTargetHelper)
-
-JSObject*
-CellBroadcast::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return MozCellBroadcastBinding::Wrap(aCx, this, aGivenProto);
-}
-
-// Forwarded nsICellBroadcastListener methods
-
-NS_IMETHODIMP
-CellBroadcast::NotifyMessageReceived(uint32_t aServiceId,
-                                     uint32_t aGsmGeographicalScope,
-                                     uint16_t aMessageCode,
-                                     uint16_t aMessageId,
-                                     const nsAString& aLanguage,
-                                     const nsAString& aBody,
-                                     uint32_t aMessageClass,
-                                     DOMTimeStamp aTimestamp,
-                                     uint32_t aCdmaServiceCategory,
-                                     bool aHasEtwsInfo,
-                                     uint32_t aEtwsWarningType,
-                                     bool aEtwsEmergencyUserAlert,
-                                     bool aEtwsPopup) {
-  MozCellBroadcastEventInit init;
-  init.mBubbles = true;
-  init.mCancelable = false;
-  init.mMessage = new CellBroadcastMessage(GetOwner(),
-                                           aServiceId,
-                                           aGsmGeographicalScope,
-                                           aMessageCode,
-                                           aMessageId,
-                                           aLanguage,
-                                           aBody,
-                                           aMessageClass,
-                                           aTimestamp,
-                                           aCdmaServiceCategory,
-                                           aHasEtwsInfo,
-                                           aEtwsWarningType,
-                                           aEtwsEmergencyUserAlert,
-                                           aEtwsPopup);
-
-  RefPtr<MozCellBroadcastEvent> event =
-    MozCellBroadcastEvent::Constructor(this, NS_LITERAL_STRING("received"), init);
-  return DispatchTrustedEvent(event);
-}
-
-already_AddRefed<nsICellBroadcastService>
-NS_CreateCellBroadcastService()
-{
-  nsCOMPtr<nsICellBroadcastService> service;
-
-  if (XRE_IsContentProcess()) {
-    service = new mozilla::dom::cellbroadcast::CellBroadcastIPCService();
-#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
-  } else {
-    service = do_GetService(GONK_CELLBROADCAST_SERVICE_CONTRACTID);
-#endif
-  }
-
-  return service.forget();
-}
deleted file mode 100644
--- a/dom/cellbroadcast/CellBroadcast.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-#ifndef mozilla_dom_CellBroadcast_h__
-#define mozilla_dom_CellBroadcast_h__
-
-#include "mozilla/Attributes.h"
-#include "mozilla/DOMEventTargetHelper.h"
-#include "mozilla/ErrorResult.h"
-#include "nsICellBroadcastService.h"
-#include "js/TypeDecls.h"
-
-class nsPIDOMWindowInner;
-
-namespace mozilla {
-namespace dom {
-
-class CellBroadcast final : public DOMEventTargetHelper,
-                                private nsICellBroadcastListener
-{
-  /**
-   * Class CellBroadcast doesn't actually expose nsICellBroadcastListener.
-   * Instead, it owns an nsICellBroadcastListener derived instance mListener
-   * and passes it to nsICellBroadcastService. The onreceived events are first
-   * delivered to mListener and then forwarded to its owner, CellBroadcast. See
-   * also bug 775997 comment #51.
-   */
-  class Listener;
-
-  // final suppresses -Werror,-Wdelete-non-virtual-dtor
-  ~CellBroadcast();
-
-public:
-  NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSICELLBROADCASTLISTENER
-
-  NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
-
-  static already_AddRefed<CellBroadcast>
-  Create(nsPIDOMWindowInner* aOwner, ErrorResult& aRv);
-
-  CellBroadcast() = delete;
-  CellBroadcast(nsPIDOMWindowInner* aWindow,
-                nsICellBroadcastService* aService);
-
-  nsPIDOMWindowInner*
-  GetParentObject() const { return GetOwner(); }
-
-  virtual JSObject*
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  IMPL_EVENT_HANDLER(received)
-
-private:
-  RefPtr<Listener> mListener;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif /* mozilla_dom_CellBroadcast_h__ */
deleted file mode 100644
--- a/dom/cellbroadcast/CellBroadcastMessage.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "CellBroadcastMessage.h"
-#include "mozilla/dom/MozCellBroadcastMessageBinding.h"
-#include "nsPIDOMWindow.h"
-#include "nsICellBroadcastService.h"
-
-namespace mozilla {
-namespace dom {
-
-/**
- * Converter for XPIDL Constants to WebIDL Enumerations
- */
-
-template<class T> struct EnumConverter {};
-
-template<class T>
-struct StaticEnumConverter
-{
-  typedef T WebidlEnumType;
-  typedef uint32_t XpidlEnumType;
-
-  static constexpr WebidlEnumType
-  x2w(XpidlEnumType aXpidlEnum) { return static_cast<WebidlEnumType>(aXpidlEnum); }
-};
-
-template<class T>
-constexpr T
-ToWebidlEnum(uint32_t aXpidlEnum) { return EnumConverter<T>::x2w(aXpidlEnum); }
-
-// Declare converters here:
-template <>
-struct EnumConverter<CellBroadcastGsmGeographicalScope> :
-  public StaticEnumConverter<CellBroadcastGsmGeographicalScope> {};
-template <>
-struct EnumConverter<CellBroadcastMessageClass> :
-  public StaticEnumConverter<CellBroadcastMessageClass> {};
-template <>
-struct EnumConverter<CellBroadcastEtwsWarningType> :
-  public StaticEnumConverter<CellBroadcastEtwsWarningType> {};
-
-/**
- * CellBroadcastMessage Implementation.
- */
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CellBroadcastMessage, mWindow, mEtwsInfo)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(CellBroadcastMessage)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(CellBroadcastMessage)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CellBroadcastMessage)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
-CellBroadcastMessage::CellBroadcastMessage(nsPIDOMWindowInner* aWindow,
-                                           uint32_t aServiceId,
-                                           uint32_t aGsmGeographicalScope,
-                                           uint16_t aMessageCode,
-                                           uint16_t aMessageId,
-                                           const nsAString& aLanguage,
-                                           const nsAString& aBody,
-                                           uint32_t aMessageClass,
-                                           uint64_t aTimestamp,
-                                           uint32_t aCdmaServiceCategory,
-                                           bool aHasEtwsInfo,
-                                           uint32_t aEtwsWarningType,
-                                           bool aEtwsEmergencyUserAlert,
-                                           bool aEtwsPopup)
-  : mWindow(aWindow)
-  , mServiceId(aServiceId)
-  , mMessageCode(aMessageCode)
-  , mMessageId(aMessageId)
-  , mLanguage(aLanguage)
-  , mBody(aBody)
-  , mTimestamp(aTimestamp)
-  , mEtwsInfo(aHasEtwsInfo ? new CellBroadcastEtwsInfo(aWindow,
-                                                       aEtwsWarningType,
-                                                       aEtwsEmergencyUserAlert,
-                                                       aEtwsPopup)
-                           : nullptr)
-{
-  if (aGsmGeographicalScope <
-      static_cast<uint32_t>(CellBroadcastGsmGeographicalScope::EndGuard_)) {
-    mGsmGeographicalScope.SetValue(
-      ToWebidlEnum<CellBroadcastGsmGeographicalScope>(aGsmGeographicalScope));
-  }
-
-  if (aMessageClass <
-      static_cast<uint32_t>(CellBroadcastMessageClass::EndGuard_)) {
-    mMessageClass.SetValue(
-      ToWebidlEnum<CellBroadcastMessageClass>(aMessageClass));
-  }
-
-  // CdmaServiceCategory represents a 16bit unsigned value.
-  if (aCdmaServiceCategory <= 0xFFFFU) {
-    mCdmaServiceCategory.SetValue(static_cast<uint16_t>(aCdmaServiceCategory));
-  }
-}
-
-JSObject*
-CellBroadcastMessage::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return MozCellBroadcastMessageBinding::Wrap(aCx, this, aGivenProto);
-}
-
-already_AddRefed<CellBroadcastEtwsInfo>
-CellBroadcastMessage::GetEtws() const
-{
-  RefPtr<CellBroadcastEtwsInfo> etwsInfo = mEtwsInfo;
-  return etwsInfo.forget();
-}
-
-/**
- * CellBroadcastEtwsInfo Implementation.
- */
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CellBroadcastEtwsInfo, mWindow)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(CellBroadcastEtwsInfo)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(CellBroadcastEtwsInfo)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CellBroadcastEtwsInfo)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
-CellBroadcastEtwsInfo::CellBroadcastEtwsInfo(nsPIDOMWindowInner* aWindow,
-                                             uint32_t aWarningType,
-                                             bool aEmergencyUserAlert,
-                                             bool aPopup)
-  : mWindow(aWindow)
-  , mEmergencyUserAlert(aEmergencyUserAlert)
-  , mPopup(aPopup)
-{
-  if (aWarningType <
-      static_cast<uint32_t>(CellBroadcastEtwsWarningType::EndGuard_)) {
-    mWarningType.SetValue(
-      ToWebidlEnum<CellBroadcastEtwsWarningType>(aWarningType));
-  }
-}
-
-JSObject*
-CellBroadcastEtwsInfo::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return MozCellBroadcastEtwsInfoBinding::Wrap(aCx, this, aGivenProto);
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/cellbroadcast/CellBroadcastMessage.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-#ifndef mozilla_dom_cellbroadcast_CellBroadcastMessage_h
-#define mozilla_dom_cellbroadcast_CellBroadcastMessage_h
-
-#include "mozilla/dom/MozCellBroadcastMessageBinding.h"
-#include "nsCOMPtr.h"
-#include "nsString.h"
-#include "nsWrapperCache.h"
-
-class nsPIDOMWindowInner;
-
-namespace mozilla {
-namespace dom {
-
-class CellBroadcastEtwsInfo;
-
-class CellBroadcastMessage final : public nsISupports
-                                 , public nsWrapperCache
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CellBroadcastMessage)
-
-  CellBroadcastMessage(nsPIDOMWindowInner* aWindow,
-                       uint32_t aServiceId,
-                       uint32_t aGsmGeographicalScope,
-                       uint16_t aMessageCode,
-                       uint16_t aMessageId,
-                       const nsAString& aLanguage,
-                       const nsAString& aBody,
-                       uint32_t aMessageClass,
-                       uint64_t aTimestamp,
-                       uint32_t aCdmaServiceCategory,
-                       bool aHasEtwsInfo,
-                       uint32_t aEtwsWarningType,
-                       bool aEtwsEmergencyUserAlert,
-                       bool aEtwsPopup);
-
-  nsPIDOMWindowInner*
-  GetParentObject() const { return mWindow; }
-
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  // WebIDL interface
-
-  uint32_t ServiceId() const { return mServiceId; }
-
-  const Nullable<CellBroadcastGsmGeographicalScope>&
-  GetGsmGeographicalScope() { return mGsmGeographicalScope; }
-
-  uint16_t MessageCode() const { return mMessageCode; }
-
-  uint16_t MessageId() const { return mMessageId; }
-
-  void GetLanguage(nsString& aLanguage) const { aLanguage = mLanguage; }
-
-  void GetBody(nsString& aBody) const { aBody = mBody; }
-
-  const Nullable<CellBroadcastMessageClass>&
-  GetMessageClass() { return mMessageClass; }
-
-  uint64_t Timestamp() const { return mTimestamp; }
-
-  // Mark this as resultNotAddRefed to return raw pointers
-  already_AddRefed<CellBroadcastEtwsInfo> GetEtws() const;
-
-  const Nullable<uint16_t>& GetCdmaServiceCategory() { return mCdmaServiceCategory; };
-
-private:
-  // final suppresses -Werror,-Wdelete-non-virtual-dtor
-  ~CellBroadcastMessage() {};
-
-  // Don't try to use the default constructor.
-  CellBroadcastMessage();
-
-  nsCOMPtr<nsPIDOMWindowInner> mWindow;
-  uint32_t mServiceId;
-  Nullable<CellBroadcastGsmGeographicalScope> mGsmGeographicalScope;
-  uint16_t mMessageCode;
-  uint16_t mMessageId;
-  nsString mLanguage;
-  nsString mBody;
-  Nullable<CellBroadcastMessageClass> mMessageClass;
-  uint64_t mTimestamp;
-  Nullable<uint16_t> mCdmaServiceCategory;
-  RefPtr<CellBroadcastEtwsInfo> mEtwsInfo;
-};
-
-class CellBroadcastEtwsInfo final : public nsISupports
-                                  , public nsWrapperCache
-{
-public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CellBroadcastEtwsInfo)
-
-  CellBroadcastEtwsInfo(nsPIDOMWindowInner* aWindow,
-                        uint32_t aWarningType,
-                        bool aEmergencyUserAlert,
-                        bool aPopup);
-
-  nsPIDOMWindowInner*
-  GetParentObject() const { return mWindow; }
-
-  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  // WebIDL interface
-
-  const Nullable<CellBroadcastEtwsWarningType>&
-  GetWarningType()  { return mWarningType; }
-
-  bool EmergencyUserAlert() const { return mEmergencyUserAlert; }
-
-  bool Popup() const { return mPopup; }
-
-private:
-  // final suppresses -Werror,-Wdelete-non-virtual-dtor
-  ~CellBroadcastEtwsInfo() {};
-
-  // Don't try to use the default constructor.
-  CellBroadcastEtwsInfo();
-
-  nsCOMPtr<nsPIDOMWindowInner> mWindow;
-  Nullable<CellBroadcastEtwsWarningType> mWarningType;
-  bool mEmergencyUserAlert;
-  bool mPopup;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_cellbroadcast_CellBroadcastMessage_h
deleted file mode 100644
--- a/dom/cellbroadcast/gonk/CellBroadcastService.js
+++ /dev/null
@@ -1,307 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* 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/. */
-
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "RIL", function () {
-  let obj = {};
-  Cu.import("resource://gre/modules/ril_consts.js", obj);
-  return obj;
-});
-
-const kMozSettingsChangedObserverTopic   = "mozsettings-changed";
-const kSettingsCellBroadcastDisabled = "ril.cellbroadcast.disabled";
-const kSettingsCellBroadcastSearchList = "ril.cellbroadcast.searchlist";
-
-XPCOMUtils.defineLazyServiceGetter(this, "gCellbroadcastMessenger",
-                                   "@mozilla.org/ril/system-messenger-helper;1",
-                                   "nsICellbroadcastMessenger");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService",
-                                   "@mozilla.org/settingsService;1",
-                                   "nsISettingsService");
-
-XPCOMUtils.defineLazyGetter(this, "gRadioInterfaceLayer", function() {
-  let ril = { numRadioInterfaces: 0 };
-  try {
-    ril = Cc["@mozilla.org/ril;1"].getService(Ci.nsIRadioInterfaceLayer);
-  } catch(e) {}
-  return ril;
-});
-
-const GONK_CELLBROADCAST_SERVICE_CONTRACTID =
-  "@mozilla.org/cellbroadcast/gonkservice;1";
-const GONK_CELLBROADCAST_SERVICE_CID =
-  Components.ID("{7ba407ce-21fd-11e4-a836-1bfdee377e5c}");
-const CELLBROADCASTMESSAGE_CID =
-  Components.ID("{29474c96-3099-486f-bb4a-3c9a1da834e4}");
-const CELLBROADCASTETWSINFO_CID =
-  Components.ID("{59f176ee-9dcd-4005-9d47-f6be0cd08e17}");
-
-const NS_XPCOM_SHUTDOWN_OBSERVER_ID = "xpcom-shutdown";
-
-var DEBUG;
-function debug(s) {
-  dump("CellBroadcastService: " + s);
-}
-
-function CellBroadcastService() {
-  this._listeners = [];
-
-  this._updateDebugFlag();
-
-  let lock = gSettingsService.createLock();
-
-  /**
-  * Read the settings of the toggle of Cellbroadcast Service:
-  *
-  * Simple Format: Boolean
-  *   true if CBS is disabled. The value is applied to all RadioInterfaces.
-  * Enhanced Format: Array of Boolean
-  *   Each element represents the toggle of CBS per RadioInterface.
-  */
-  lock.get(kSettingsCellBroadcastDisabled, this);
-
-  /**
-   * Read the Cell Broadcast Search List setting to set listening channels:
-   *
-   * Simple Format:
-   *   String of integers or integer ranges separated by comma.
-   *   For example, "1, 2, 4-6"
-   * Enhanced Format:
-   *   Array of Objects with search lists specified in gsm/cdma network.
-   *   For example, [{'gsm' : "1, 2, 4-6", 'cdma' : "1, 50, 99"},
-   *                 {'cdma' : "3, 6, 8-9"}]
-   *   This provides the possibility to
-   *   1. set gsm/cdma search list individually for CDMA+LTE device.
-   *   2. set search list per RadioInterface.
-   */
-  lock.get(kSettingsCellBroadcastSearchList, this);
-
-  Services.obs.addObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
-  Services.obs.addObserver(this, kMozSettingsChangedObserverTopic, false);
-}
-CellBroadcastService.prototype = {
-  classID: GONK_CELLBROADCAST_SERVICE_CID,
-
-  classInfo: XPCOMUtils.generateCI({classID: GONK_CELLBROADCAST_SERVICE_CID,
-                                    contractID: GONK_CELLBROADCAST_SERVICE_CONTRACTID,
-                                    classDescription: "CellBroadcastService",
-                                    interfaces: [Ci.nsICellBroadcastService,
-                                                 Ci.nsIGonkCellBroadcastService],
-                                    flags: Ci.nsIClassInfo.SINGLETON}),
-
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsICellBroadcastService,
-                                         Ci.nsIGonkCellBroadcastService,
-                                         Ci.nsISettingsServiceCallback,
-                                         Ci.nsIObserver]),
-
-  // An array of nsICellBroadcastListener instances.
-  _listeners: null,
-
-  // Setting values of Cell Broadcast SearchList.
-  _cellBroadcastSearchList: null,
-
-  _updateDebugFlag: function() {
-    try {
-      DEBUG = RIL.DEBUG_RIL ||
-              Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
-    } catch (e) {}
-  },
-
-  _retrieveSettingValueByClient: function(aClientId, aSettings) {
-    return Array.isArray(aSettings) ? aSettings[aClientId] : aSettings;
-  },
-
-  /**
-   * Helper function to set CellBroadcastDisabled to each RadioInterface.
-   */
-  setCellBroadcastDisabled: function(aSettings) {
-    let numOfRilClients = gRadioInterfaceLayer.numRadioInterfaces;
-    let responses = [];
-    for (let clientId = 0; clientId < numOfRilClients; clientId++) {
-      gRadioInterfaceLayer
-        .getRadioInterface(clientId)
-        .sendWorkerMessage("setCellBroadcastDisabled",
-                           { disabled: this._retrieveSettingValueByClient(clientId, aSettings) });
-    }
-  },
-
-  /**
-   * Helper function to set CellBroadcastSearchList to each RadioInterface.
-   */
-  setCellBroadcastSearchList: function(aSettings) {
-    let numOfRilClients = gRadioInterfaceLayer.numRadioInterfaces;
-    let responses = [];
-    for (let clientId = 0; clientId < numOfRilClients; clientId++) {
-      let newSearchList = this._retrieveSettingValueByClient(clientId, aSettings);
-      let oldSearchList = this._retrieveSettingValueByClient(clientId,
-                                                          this._cellBroadcastSearchList);
-
-      if ((newSearchList == oldSearchList) ||
-          (newSearchList && oldSearchList &&
-           newSearchList.gsm == oldSearchList.gsm &&
-           newSearchList.cdma == oldSearchList.cdma)) {
-        return;
-      }
-
-      gRadioInterfaceLayer
-        .getRadioInterface(clientId).sendWorkerMessage("setCellBroadcastSearchList",
-                                                       { searchList: newSearchList },
-                                                       (function callback(aResponse) {
-        if (DEBUG && aResponse.errorMsg) {
-          debug("Failed to set new search list: " + newSearchList +
-                " to client id: " + clientId);
-        }
-
-        responses.push(aResponse);
-        if (responses.length == numOfRilClients) {
-          let successCount = 0;
-          for (let i = 0; i < responses.length; i++) {
-            if (!responses[i].errorMsg) {
-              successCount++;
-            }
-          }
-          if (successCount == numOfRilClients) {
-            this._cellBroadcastSearchList = aSettings;
-          } else {
-            // Rollback the change when failure.
-            let lock = gSettingsService.createLock();
-            lock.set(kSettingsCellBroadcastSearchList,
-                     this._cellBroadcastSearchList, null);
-          }
-        }
-
-        return false;
-      }).bind(this));
-    }
-  },
-
-  /**
-   * nsICellBroadcastService interface
-   */
-  registerListener: function(aListener) {
-    if (this._listeners.indexOf(aListener) >= 0) {
-      throw Cr.NS_ERROR_UNEXPECTED;
-    }
-
-    this._listeners.push(aListener);
-  },
-
-  unregisterListener: function(aListener) {
-    let index = this._listeners.indexOf(aListener);
-
-    if (index < 0) {
-      throw Cr.NS_ERROR_UNEXPECTED;
-    }
-
-    this._listeners.splice(index, 1);
-  },
-
-  /**
-   * nsIGonkCellBroadcastService interface
-   */
-  notifyMessageReceived: function(aServiceId,
-                                  aGsmGeographicalScope,
-                                  aMessageCode,
-                                  aMessageId,
-                                  aLanguage,
-                                  aBody,
-                                  aMessageClass,
-                                  aTimestamp,
-                                  aCdmaServiceCategory,
-                                  aHasEtwsInfo,
-                                  aEtwsWarningType,
-                                  aEtwsEmergencyUserAlert,
-                                  aEtwsPopup) {
-    // Broadcast CBS System message
-    gCellbroadcastMessenger.notifyCbMessageReceived(aServiceId,
-                                                    aGsmGeographicalScope,
-                                                    aMessageCode,
-                                                    aMessageId,
-                                                    aLanguage,
-                                                    aBody,
-                                                    aMessageClass,
-                                                    aTimestamp,
-                                                    aCdmaServiceCategory,
-                                                    aHasEtwsInfo,
-                                                    aEtwsWarningType,
-                                                    aEtwsEmergencyUserAlert,
-                                                    aEtwsPopup);
-
-    // Notify received message to registered listener
-    for (let listener of this._listeners) {
-      try {
-        listener.notifyMessageReceived(aServiceId,
-                                       aGsmGeographicalScope,
-                                       aMessageCode,
-                                       aMessageId,
-                                       aLanguage,
-                                       aBody,
-                                       aMessageClass,
-                                       aTimestamp,
-                                       aCdmaServiceCategory,
-                                       aHasEtwsInfo,
-                                       aEtwsWarningType,
-                                       aEtwsEmergencyUserAlert,
-                                       aEtwsPopup);
-      } catch (e) {
-        debug("listener threw an exception: " + e);
-      }
-    }
-  },
-
-  /**
-   * nsISettingsServiceCallback interface.
-   */
-  handle: function(aName, aResult) {
-    switch (aName) {
-      case kSettingsCellBroadcastSearchList:
-        if (DEBUG) {
-          debug("'" + kSettingsCellBroadcastSearchList +
-                "' is now " + JSON.stringify(aResult));
-        }
-
-        this.setCellBroadcastSearchList(aResult);
-        break;
-      case kSettingsCellBroadcastDisabled:
-        if (DEBUG) {
-          debug("'" + kSettingsCellBroadcastDisabled +
-                "' is now " + JSON.stringify(aResult));
-        }
-
-        this.setCellBroadcastDisabled(aResult);
-        break;
-    }
-  },
-
-  /**
-   * nsIObserver interface.
-   */
-  observe: function(aSubject, aTopic, aData) {
-    switch (aTopic) {
-      case kMozSettingsChangedObserverTopic:
-        if ("wrappedJSObject" in aSubject) {
-          aSubject = aSubject.wrappedJSObject;
-        }
-        this.handle(aSubject.key, aSubject.value);
-        break;
-      case NS_XPCOM_SHUTDOWN_OBSERVER_ID:
-        Services.obs.removeObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
-        Services.obs.removeObserver(this, kMozSettingsChangedObserverTopic);
-
-        // Remove all listeners.
-        this._listeners = [];
-        break;
-    }
-  }
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CellBroadcastService]);
deleted file mode 100644
--- a/dom/cellbroadcast/gonk/CellBroadcastService.manifest
+++ /dev/null
@@ -1,7 +0,0 @@
-# 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/.
-
-component {7ba407ce-21fd-11e4-a836-1bfdee377e5c} CellBroadcastService.js
-contract @mozilla.org/cellbroadcast/gonkservice;1 {7ba407ce-21fd-11e4-a836-1bfdee377e5c}
-category profile-after-change CellBroadcastService @mozilla.org/cellbroadcast/gonkservice;1
deleted file mode 100644
--- a/dom/cellbroadcast/interfaces/moz.build
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-XPIDL_SOURCES += [
-    'nsICellBroadcastService.idl',
-]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
-    XPIDL_SOURCES += [
-        'nsICellbroadcastMessenger.idl',
-        'nsIGonkCellBroadcastService.idl',
-    ]
-
-XPIDL_MODULE = 'dom_cellbroadcast'
deleted file mode 100644
--- a/dom/cellbroadcast/interfaces/nsICellBroadcastService.idl
+++ /dev/null
@@ -1,97 +0,0 @@
-/* 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 "domstubs.idl"
-#include "nsISupports.idl"
-
-[scriptable, uuid(56f66190-44a0-11e4-aa32-636783cc014a)]
-interface nsICellBroadcastListener : nsISupports
-{
-  /**
-   * Called when a Cell Broadcast message has been received by the network.
-   */
-  void notifyMessageReceived(in unsigned long aServiceId,
-                             in unsigned long aGsmGeographicalScope,
-                             in unsigned short aMessageCode,
-                             in unsigned short aMessageId,
-                             in DOMString aLanguage,
-                             in DOMString aBody,
-                             in unsigned long aMessageClass,
-                             in DOMTimeStamp aTimestamp,
-                             in unsigned long aCdmaServiceCategory,
-                             in boolean aHasEtwsInfo,
-                             in unsigned long aEtwsWarningType,
-                             in boolean aEtwsEmergencyUserAlert,
-                             in boolean aEtwsPopup);
-};
-
-%{C++
-#define CELLBROADCAST_SERVICE_CID \
-  { 0xc870bdca, 0x277c, 0x11e4, { 0xac, 0xa3, 0x33, 0x73, 0xa1, 0xef, 0x48, 0xf8 } }
-#define CELLBROADCAST_SERVICE_CONTRACTID \
-  "@mozilla.org/cellbroadcast/cellbroadcastservice;1"
-%}
-
-/**
- * XPCOM component that provides the cell broadcast information.
- */
-[scriptable, uuid(906cda5a-6b18-11e4-973b-5ff3fc075b6b)]
-interface nsICellBroadcastService : nsISupports
-{
-  /**
-   * Constant definitions of predefined GSM Geographic Scope
-   * See 3GPP TS 23.041 clause 9.4.1.2.1 Serial Number
-   */
-  const unsigned short GSM_GEOGRAPHICAL_SCOPE_CELL_IMMEDIATE = 0;
-  const unsigned short GSM_GEOGRAPHICAL_SCOPE_PLMN           = 1;
-  const unsigned short GSM_GEOGRAPHICAL_SCOPE_LOCATION_AREA  = 2;
-  const unsigned short GSM_GEOGRAPHICAL_SCOPE_CELL           = 3;
-  const unsigned short GSM_GEOGRAPHICAL_SCOPE_INVALID        = 0xFFFF;
-
-  /**
-   * Constant definitions of predefined GSM Message Class
-   * See 3GPP TS 23.038 clause 5 CBS Data Coding Scheme
-   *
-   * Set to GSM_MESSAGE_CLASS_NORMAL if no message class is specified.
-   */
-  const unsigned short GSM_MESSAGE_CLASS_0       = 0;
-  const unsigned short GSM_MESSAGE_CLASS_1       = 1;
-  const unsigned short GSM_MESSAGE_CLASS_2       = 2;
-  const unsigned short GSM_MESSAGE_CLASS_3       = 3;
-  const unsigned short GSM_MESSAGE_CLASS_USER_1  = 4;
-  const unsigned short GSM_MESSAGE_CLASS_USER_2  = 5;
-  const unsigned short GSM_MESSAGE_CLASS_NORMAL  = 6;
-
-  /**
-   * Constant definitions of predefined GSM ETWS Warning Types
-   * see 3GPP TS 23.041 clause 9.3.24 Warning-Type
-   */
-  const unsigned short GSM_ETWS_WARNING_EARTHQUAKE         = 0;
-  const unsigned short GSM_ETWS_WARNING_TSUNAMI            = 1;
-  const unsigned short GSM_ETWS_WARNING_EARTHQUAKE_TSUNAMI = 2;
-  const unsigned short GSM_ETWS_WARNING_TEST               = 3;
-  const unsigned short GSM_ETWS_WARNING_OTHER              = 4;
-  const unsigned short GSM_ETWS_WARNING_INVALID            = 0xFFFF;
-
-  /**
-   * Attribute CdmaServiceCategory is only valid in CDMA network.
-   * Set to CDMA_SERVICE_CATEGORY_INVALID if received from GSM/UMTS network.
-   */
-  const unsigned long CDMA_SERVICE_CATEGORY_INVALID = 0xFFFFFFFF;
-
-  /**
-   * Called to register receiving cellbroadcast messages.
-   *
-   * 'cellbroadcast' permission is required for registration/unregistration.
-   */
-  void registerListener(in nsICellBroadcastListener listener);
-  void unregisterListener(in nsICellBroadcastListener listener);
-};
-
-%{C++
-template<typename T> struct already_AddRefed;
-
-already_AddRefed<nsICellBroadcastService>
-NS_CreateCellBroadcastService();
-%}
deleted file mode 100644
--- a/dom/cellbroadcast/interfaces/nsICellbroadcastMessenger.idl
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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 "domstubs.idl"
-#include "nsISupports.idl"
-
-[scriptable, uuid(47764f4a-5b3f-11e4-a2ec-4b99529b9288)]
-interface nsICellbroadcastMessenger : nsISupports
-{
-  /**
-   * To broadcast 'cellbroadcast-received' system message.
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aGsmGeographicalScope
-   *        @See nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_*.
-   * @param aMessageCode
-   *        The Message Code differentiates between messages from the same
-   *        source and type (e.g., with the same Message Identifier).
-   * @param aMessageId
-   *        Source and type of the message which is coded in binary.
-   * @param aLanguage
-   *        ISO-639-1 language code for this message. Null if unspecified.
-   * @param aBody
-   *        Text message carried by the message.
-   * @param aMessageClass
-   *        @See nsICellBroadcastService.GSM_MESSAGE_CLASS_*.
-   * @param aTimestamp
-   *        System time stamp at receival.
-   * @param aCdmaServiceCategory
-   *        CDMA Service Category.
-   * @param aHasEtwsInfo
-   *        True if ETWS Info is included in this message.
-   * @param aEtwsWarningType
-   *        @See nsICellBroadcastService.GSM_ETWS_WARNING_*.
-   * @param aEtwsEmergencyUserAlert
-   *        True if Emergency user alert indication is set.
-   * @param aEtwsPopup
-   *        True if Message popup indication is set.
-   */
-  void notifyCbMessageReceived(in unsigned long aServiceId,
-                               in unsigned long aGsmGeographicalScope,
-                               in unsigned short aMessageCode,
-                               in unsigned short aMessageId,
-                               in DOMString aLanguage,
-                               in DOMString aBody,
-                               in unsigned long aMessageClass,
-                               in DOMTimeStamp aTimestamp,
-                               in unsigned long aCdmaServiceCategory,
-                               in boolean aHasEtwsInfo,
-                               in unsigned long aEtwsWarningType,
-                               in boolean aEtwsEmergencyUserAlert,
-                               in boolean aEtwsPopup);
-};
deleted file mode 100644
--- a/dom/cellbroadcast/interfaces/nsIGonkCellBroadcastService.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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 "nsICellBroadcastService.idl"
-
-%{C++
-#define GONK_CELLBROADCAST_SERVICE_CONTRACTID \
-        "@mozilla.org/cellbroadcast/gonkservice;1"
-%}
-
-[scriptable, uuid(7cac92aa-42f8-11e4-96f3-7f490e355277)]
-interface nsIGonkCellBroadcastService : nsICellBroadcastService
-{
-  /**
-   * Called when a cellbroadcast message has been received by the network.
-   */
-  void notifyMessageReceived(in unsigned long aServiceId,
-                             in unsigned long aGsmGeographicalScope,
-                             in unsigned short aMessageCode,
-                             in unsigned short aMessageId,
-                             in DOMString aLanguage,
-                             in DOMString aBody,
-                             in unsigned long aMessageClass,
-                             in DOMTimeStamp aTimestamp,
-                             in unsigned long aCdmaServiceCategory,
-                             in boolean aHasEtwsInfo,
-                             in unsigned long aEtwsWarningType,
-                             in boolean aEtwsEmergencyUserAlert,
-                             in boolean aEtwsPopup);
-};
deleted file mode 100644
--- a/dom/cellbroadcast/ipc/CellBroadcastIPCService.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 "CellBroadcastIPCService.h"
-#include "mozilla/dom/ContentChild.h"
-
-namespace mozilla {
-namespace dom {
-namespace cellbroadcast {
-
-NS_IMPL_ISUPPORTS(CellBroadcastIPCService, nsICellBroadcastService)
-
-CellBroadcastIPCService::CellBroadcastIPCService()
-  : mActorDestroyed(false)
-{
-  ContentChild::GetSingleton()->SendPCellBroadcastConstructor(this);
-}
-
-CellBroadcastIPCService::~CellBroadcastIPCService()
-{
-  if (!mActorDestroyed) {
-    Send__delete__(this);
-  }
-
-  mListeners.Clear();
-}
-
-/*
- * Implementation of nsICellBroadcastService.
- */
-
-NS_IMETHODIMP
-CellBroadcastIPCService::RegisterListener(nsICellBroadcastListener* aListener)
-{
-  MOZ_ASSERT(!mListeners.Contains(aListener));
-
-  NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_UNEXPECTED);
-
-  // nsTArray doesn't fail.
-  mListeners.AppendElement(aListener);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-CellBroadcastIPCService::UnregisterListener(nsICellBroadcastListener* aListener)
-{
-  MOZ_ASSERT(mListeners.Contains(aListener));
-
-  NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_UNEXPECTED);
-
-  // We always have the element here, so it can't fail.
-  mListeners.RemoveElement(aListener);
-
-  return NS_OK;
-}
-
-/*
- * Implementation of PCellBroadcastChild.
- */
-
-bool
-CellBroadcastIPCService::RecvNotifyReceivedMessage(const uint32_t& aServiceId,
-                                              const uint32_t& aGsmGeographicalScope,
-                                              const uint16_t& aMessageCode,
-                                              const uint16_t& aMessageId,
-                                              const nsString& aLanguage,
-                                              const nsString& aBody,
-                                              const uint32_t& aMessageClass,
-                                              const uint64_t& aTimestamp,
-                                              const uint32_t& aCdmaServiceCategory,
-                                              const bool& aHasEtwsInfo,
-                                              const uint32_t& aEtwsWarningType,
-                                              const bool& aEtwsEmergencyUserAlert,
-                                              const bool& aEtwsPopup)
-{
-  // UnregisterListener() could be triggered in
-  // nsICellBroadcastListener::NotifyMessageReceived().
-  // Make a immutable copy for notifying the event.
-  nsTArray<nsCOMPtr<nsICellBroadcastListener>> immutableListeners(mListeners);
-  for (uint32_t i = 0; i < immutableListeners.Length(); i++) {
-    immutableListeners[i]->NotifyMessageReceived(aServiceId,
-                                                 aGsmGeographicalScope,
-                                                 aMessageCode,
-                                                 aMessageId,
-                                                 aLanguage,
-                                                 aBody,
-                                                 aMessageClass,
-                                                 aTimestamp,
-                                                 aCdmaServiceCategory,
-                                                 aHasEtwsInfo,
-                                                 aEtwsWarningType,
-                                                 aEtwsEmergencyUserAlert,
-                                                 aEtwsPopup);
-  }
-
-  return true;
-}
-
-void
-CellBroadcastIPCService::ActorDestroy(ActorDestroyReason aWhy)
-{
-  mActorDestroyed = true;
-}
-
-} // namespace cellbroadcast
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/cellbroadcast/ipc/CellBroadcastIPCService.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-#ifndef mozilla_dom_cellbroadcast_CellBroadcastIPCService_h
-#define mozilla_dom_cellbroadcast_CellBroadcastIPCService_h
-
-#include "mozilla/dom/cellbroadcast/PCellBroadcastChild.h"
-#include "nsICellBroadcastService.h"
-#include "nsCOMPtr.h"
-#include "nsTArray.h"
-
-namespace mozilla {
-namespace dom {
-namespace cellbroadcast {
-
-class CellBroadcastIPCService final : public PCellBroadcastChild
-                                    , public nsICellBroadcastService
-
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSICELLBROADCASTSERVICE
-
-  CellBroadcastIPCService();
-
-  // PCellBroadcastChild interface
-  virtual bool
-  RecvNotifyReceivedMessage(const uint32_t& aServiceId,
-                            const uint32_t& aGsmGeographicalScope,
-                            const uint16_t& aMessageCode,
-                            const uint16_t& aMessageId,
-                            const nsString& aLanguage,
-                            const nsString& aBody,
-                            const uint32_t& aMessageClass,
-                            const uint64_t& aTimestamp,
-                            const uint32_t& aCdmaServiceCategory,
-                            const bool& aHasEtwsInfo,
-                            const uint32_t& aEtwsWarningType,
-                            const bool& aEtwsEmergencyUserAlert,
-                            const bool& aEtwsPopup) override;
-
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-
-private:
-  // final suppresses -Werror,-Wdelete-non-virtual-dtor
-  ~CellBroadcastIPCService();
-
-  bool mActorDestroyed;
-  nsTArray<nsCOMPtr<nsICellBroadcastListener>> mListeners;
-};
-
-} // namespace cellbroadcast
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_cellbroadcast_CellBroadcastIPCService_h
deleted file mode 100644
--- a/dom/cellbroadcast/ipc/CellBroadcastParent.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/cellbroadcast/CellBroadcastParent.h"
-#include "nsServiceManagerUtils.h"
-
-namespace mozilla {
-namespace dom {
-namespace cellbroadcast {
-
-NS_IMPL_ISUPPORTS(CellBroadcastParent, nsICellBroadcastListener)
-
-bool
-CellBroadcastParent::Init()
-{
-  nsCOMPtr<nsICellBroadcastService> service =
-    do_GetService(CELLBROADCAST_SERVICE_CONTRACTID);
-
-  if (service) {
-    return NS_SUCCEEDED(service->RegisterListener(this));
-  }
-
-  return false;
-}
-
-void
-CellBroadcastParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  nsCOMPtr<nsICellBroadcastService> service =
-    do_GetService(CELLBROADCAST_SERVICE_CONTRACTID);
-  if (service) {
-    service->UnregisterListener(this);
-  }
-}
-
-/*
- * nsICellBroadcastListener
- */
-NS_IMETHODIMP
-CellBroadcastParent::NotifyMessageReceived(uint32_t aServiceId,
-                                           uint32_t aGsmGeographicalScope,
-                                           uint16_t aMessageCode,
-                                           uint16_t aMessageId,
-                                           const nsAString& aLanguage,
-                                           const nsAString& aBody,
-                                           uint32_t aMessageClass,
-                                           DOMTimeStamp aTimestamp,
-                                           uint32_t aCdmaServiceCategory,
-                                           bool aHasEtwsInfo,
-                                           uint32_t aEtwsWarningType,
-                                           bool aEtwsEmergencyUserAlert,
-                                           bool aEtwsPopup)
-{
-  return SendNotifyReceivedMessage(aServiceId,
-                                   aGsmGeographicalScope,
-                                   aMessageCode,
-                                   aMessageId,
-                                   nsString(aLanguage),
-                                   nsString(aBody),
-                                   aMessageClass,
-                                   aTimestamp,
-                                   aCdmaServiceCategory,
-                                   aHasEtwsInfo,
-                                   aEtwsWarningType,
-                                   aEtwsEmergencyUserAlert,
-                                   aEtwsPopup) ? NS_OK : NS_ERROR_FAILURE;
-}
-
-} // namespace cellbroadcast
-} // namespace dom
-} // namespace mozilla
\ No newline at end of file
deleted file mode 100644
--- a/dom/cellbroadcast/ipc/CellBroadcastParent.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-
-#ifndef mozilla_dom_cellbroadcast_CellBroadcastParent_h
-#define mozilla_dom_cellbroadcast_CellBroadcastParent_h
-
-#include "mozilla/dom/cellbroadcast/PCellBroadcastParent.h"
-#include "nsICellBroadcastService.h"
-
-namespace mozilla {
-namespace dom {
-namespace cellbroadcast {
-
-class CellBroadcastParent final : public PCellBroadcastParent
-                                , public nsICellBroadcastListener
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSICELLBROADCASTLISTENER
-
-  bool Init();
-
-private:
-  // final suppresses -Werror,-Wdelete-non-virtual-dtor
-  ~CellBroadcastParent() {};
-
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-};
-
-} // namespace cellbroadcast
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h
deleted file mode 100644
--- a/dom/cellbroadcast/ipc/PCellBroadcast.ipdl
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set sw=2 ts=8 et ft=cpp : */
-/* 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 protocol PContent;
-
-namespace mozilla {
-namespace dom {
-namespace cellbroadcast {
-
-sync protocol PCellBroadcast {
-  manager PContent;
-
-child:
-  async NotifyReceivedMessage(uint32_t aServiceId,
-                              uint32_t aGsmGeographicalScope,
-                              uint16_t aMessageCode,
-                              uint16_t aMessageId,
-                              nsString aLanguage,
-                              nsString aBody,
-                              uint32_t aMessageClass,
-                              uint64_t aTimestamp,
-                              uint32_t aCdmaServiceCategory,
-                              bool aHasEtwsInfo,
-                              uint32_t aEtwsWarningType,
-                              bool aEtwsEmergencyUserAlert,
-                              bool aEtwsPopup);
-
-parent:
-  /**
-   * Sent when the child no longer needs to use cellbroadcast.
-   */
-  async __delete__();
-
-};
-
-} // namespace mobilemessage
-} // namespace dom
-} // namespace cellbroadcast
deleted file mode 100644
--- a/dom/cellbroadcast/moz.build
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-DIRS += ['interfaces']
-
-EXPORTS.mozilla.dom += [
-    'CellBroadcast.h',
-    'CellBroadcastMessage.h',
-]
-
-UNIFIED_SOURCES += [
-    'CellBroadcast.cpp',
-    'CellBroadcastMessage.cpp',
-    'ipc/CellBroadcastIPCService.cpp',
-    'ipc/CellBroadcastParent.cpp',
-]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL'] and not CONFIG['DISABLE_MOZ_RIL_GEOLOC']:
-    EXTRA_COMPONENTS += [
-        'gonk/CellBroadcastService.js',
-        'gonk/CellBroadcastService.manifest',
-    ]
-
-EXPORTS.mozilla.dom.cellbroadcast += [
-    'ipc/CellBroadcastIPCService.h',
-    'ipc/CellBroadcastParent.h',
-]
-
-IPDL_SOURCES += [
-    'ipc/PCellBroadcast.ipdl',
-]
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/head.js
+++ /dev/null
@@ -1,411 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const {Cc: Cc, Ci: Ci, Cr: Cr, Cu: Cu} = SpecialPowers;
-
-// Emulate Promise.jsm semantics.
-Promise.defer = function() { return new Deferred(); }
-function Deferred()  {
-  this.promise = new Promise(function(resolve, reject) {
-    this.resolve = resolve;
-    this.reject = reject;
-  }.bind(this));
-  Object.freeze(this);
-}
-
-const PDU_DCS_CODING_GROUP_BITS          = 0xF0;
-const PDU_DCS_MSG_CODING_7BITS_ALPHABET  = 0x00;
-const PDU_DCS_MSG_CODING_8BITS_ALPHABET  = 0x04;
-const PDU_DCS_MSG_CODING_16BITS_ALPHABET = 0x08;
-
-const PDU_DCS_MSG_CLASS_BITS             = 0x03;
-const PDU_DCS_MSG_CLASS_NORMAL           = 0xFF;
-const PDU_DCS_MSG_CLASS_0                = 0x00;
-const PDU_DCS_MSG_CLASS_ME_SPECIFIC      = 0x01;
-const PDU_DCS_MSG_CLASS_SIM_SPECIFIC     = 0x02;
-const PDU_DCS_MSG_CLASS_TE_SPECIFIC      = 0x03;
-const PDU_DCS_MSG_CLASS_USER_1           = 0x04;
-const PDU_DCS_MSG_CLASS_USER_2           = 0x05;
-
-const GECKO_SMS_MESSAGE_CLASSES = {};
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_NORMAL]       = "normal";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_0]            = "class-0";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_ME_SPECIFIC]  = "class-1";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_SIM_SPECIFIC] = "class-2";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_TE_SPECIFIC]  = "class-3";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_USER_1]       = "user-1";
-GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_USER_2]       = "user-2";
-
-const CB_MESSAGE_SIZE_GSM  = 88;
-const CB_MESSAGE_SIZE_ETWS = 56;
-
-const CB_UMTS_MESSAGE_TYPE_CBS = 1;
-const CB_UMTS_MESSAGE_PAGE_SIZE = 82;
-
-const CB_GSM_MESSAGEID_ETWS_BEGIN = 0x1100;
-const CB_GSM_MESSAGEID_ETWS_END   = 0x1107;
-
-const CB_GSM_GEOGRAPHICAL_SCOPE_NAMES = [
-  "cell-immediate",
-  "plmn",
-  "location-area",
-  "cell"
-];
-
-const CB_ETWS_WARNING_TYPE_NAMES = [
-  "earthquake",
-  "tsunami",
-  "earthquake-tsunami",
-  "test",
-  "other"
-];
-
-const CB_DCS_LANG_GROUP_1 = [
-  "de", "en", "it", "fr", "es", "nl", "sv", "da", "pt", "fi",
-  "no", "el", "tr", "hu", "pl", null
-];
-const CB_DCS_LANG_GROUP_2 = [
-  "cs", "he", "ar", "ru", "is", null, null, null, null, null,
-  null, null, null, null, null, null
-];
-
-const CB_MAX_CONTENT_PER_PAGE_7BIT = Math.floor((CB_MESSAGE_SIZE_GSM - 6) * 8 / 7);
-const CB_MAX_CONTENT_PER_PAGE_UCS2 = Math.floor((CB_MESSAGE_SIZE_GSM - 6) / 2);
-
-const DUMMY_BODY_7BITS = "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-                       + "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
-                       + "@@@@@@@@@@@@@"; // 93 ascii chars.
-const DUMMY_BODY_7BITS_IND = DUMMY_BODY_7BITS.substr(3);
-const DUMMY_BODY_UCS2 = "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
-                      + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
-                      + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
-                      + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
-                      + "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
-                      + "\u0000"; // 41 unicode chars.
-const DUMMY_BODY_UCS2_IND = DUMMY_BODY_UCS2.substr(1);
-
-is(DUMMY_BODY_7BITS.length,     CB_MAX_CONTENT_PER_PAGE_7BIT,     "DUMMY_BODY_7BITS.length");
-is(DUMMY_BODY_7BITS_IND.length, CB_MAX_CONTENT_PER_PAGE_7BIT - 3, "DUMMY_BODY_7BITS_IND.length");
-is(DUMMY_BODY_UCS2.length,      CB_MAX_CONTENT_PER_PAGE_UCS2,     "DUMMY_BODY_UCS2.length");
-is(DUMMY_BODY_UCS2_IND.length,  CB_MAX_CONTENT_PER_PAGE_UCS2 - 1, "DUMMY_BODY_UCS2_IND.length");
-
-/**
- * Compose input number into specified number of semi-octets.
- *
- * @param: aNum
- *         The number to be converted.
- * @param: aNumSemiOctets
- *         Number of semi-octects to be composed to.
- *
- * @return The composed Hex String.
- */
-function buildHexStr(aNum, aNumSemiOctets) {
-  let str = aNum.toString(16);
-  ok(str.length <= aNumSemiOctets);
-  while (str.length < aNumSemiOctets) {
-    str = "0" + str;
-  }
-  return str;
-}
-
-/**
- * Helper function to decode the given DCS into encoding type, language,
- * language indicator and message class.
- *
- * @param: aDcs
- *         The DCS to be decoded.
- *
- * @return [encoding, language, hasLanguageIndicator,
- *          GECKO_SMS_MESSAGE_CLASSES[messageClass]]
- */
-function decodeGsmDataCodingScheme(aDcs) {
-  let language = null;
-  let hasLanguageIndicator = false;
-  let encoding = PDU_DCS_MSG_CODING_7BITS_ALPHABET;
-  let messageClass = PDU_DCS_MSG_CLASS_NORMAL;
-
-  switch (aDcs & PDU_DCS_CODING_GROUP_BITS) {
-    case 0x00: // 0000
-      language = CB_DCS_LANG_GROUP_1[aDcs & 0x0F];
-      break;
-
-    case 0x10: // 0001
-      switch (aDcs & 0x0F) {
-        case 0x00:
-          hasLanguageIndicator = true;
-          break;
-        case 0x01:
-          encoding = PDU_DCS_MSG_CODING_16BITS_ALPHABET;
-          hasLanguageIndicator = true;
-          break;
-      }
-      break;
-
-    case 0x20: // 0010
-      language = CB_DCS_LANG_GROUP_2[aDcs & 0x0F];
-      break;
-
-    case 0x40: // 01xx
-    case 0x50:
-    //case 0x60:
-    //case 0x70:
-    case 0x90: // 1001
-      encoding = (aDcs & 0x0C);
-      if (encoding == 0x0C) {
-        encoding = PDU_DCS_MSG_CODING_7BITS_ALPHABET;
-      }
-      messageClass = (aDcs & PDU_DCS_MSG_CLASS_BITS);
-      break;
-
-    case 0xF0:
-      encoding = (aDcs & 0x04) ? PDU_DCS_MSG_CODING_8BITS_ALPHABET
-                              : PDU_DCS_MSG_CODING_7BITS_ALPHABET;
-      switch(aDcs & PDU_DCS_MSG_CLASS_BITS) {
-        case 0x01: messageClass = PDU_DCS_MSG_CLASS_USER_1; break;
-        case 0x02: messageClass = PDU_DCS_MSG_CLASS_USER_2; break;
-        case 0x03: messageClass = PDU_DCS_MSG_CLASS_TE_SPECIFIC; break;
-      }
-      break;
-
-    case 0x30: // 0011 (Reserved)
-    case 0x80: // 1000 (Reserved)
-    case 0xA0: // 1010..1100 (Reserved)
-    case 0xB0:
-    case 0xC0:
-      break;
-    default:
-      throw new Error("Unsupported CBS data coding scheme: " + aDcs);
-  }
-
-  return [encoding, language, hasLanguageIndicator,
-          GECKO_SMS_MESSAGE_CLASSES[messageClass]];
-}
-
-/**
- * Push required permissions and test if |navigator.mozCellBroadcast| exists.
- * Resolve if it does, reject otherwise.
- *
- * Fulfill params:
- *   cbManager -- an reference to navigator.mozCellBroadcast.
- *
- * Reject params: (none)
- *
- * @return A deferred promise.
- */
-var cbManager;
-function ensureCellBroadcast() {
-  let deferred = Promise.defer();
-
-  let permissions = [{
-    "type": "cellbroadcast",
-    "allow": 1,
-    "context": document,
-  }];
-  SpecialPowers.pushPermissions(permissions, function() {
-    ok(true, "permissions pushed: " + JSON.stringify(permissions));
-
-    // Permission changes can't change existing Navigator.prototype
-    // objects, so grab our objects from a new Navigator.
-    let workingFrame = document.createElement("iframe");
-    workingFrame.addEventListener("load", function load() {
-      workingFrame.removeEventListener("load", load);
-
-      cbManager = workingFrame.contentWindow.navigator.mozCellBroadcast;
-
-      if (cbManager) {
-        log("navigator.mozCellBroadcast is instance of " + cbManager.constructor);
-      } else {
-        log("navigator.mozCellBroadcast is undefined.");
-      }
-
-      if (cbManager instanceof window.MozCellBroadcast) {
-        deferred.resolve(cbManager);
-      } else {
-        deferred.reject();
-      }
-    });
-
-    document.body.appendChild(workingFrame);
-  });
-
-  return deferred.promise;
-}
-
-/**
- * Send emulator command with safe guard.
- *
- * We should only call |finish()| after all emulator command transactions
- * end, so here comes with the pending counter.  Resolve when the emulator
- * gives positive response, and reject otherwise.
- *
- * Fulfill params:
- *   result -- an array of emulator response lines.
- *
- * Reject params:
- *   result -- an array of emulator response lines.
- *
- * @return A deferred promise.
- */
-var pendingEmulatorCmdCount = 0;
-function runEmulatorCmdSafe(aCommand) {
-  let deferred = Promise.defer();
-
-  ++pendingEmulatorCmdCount;
-  runEmulatorCmd(aCommand, function(aResult) {
-    --pendingEmulatorCmdCount;
-
-    ok(true, "Emulator response: " + JSON.stringify(aResult));
-    if (Array.isArray(aResult) && aResult[aResult.length - 1] === "OK") {
-      deferred.resolve(aResult);
-    } else {
-      deferred.reject(aResult);
-    }
-  });
-
-  return deferred.promise;
-}
-
-/**
- * Send raw CBS PDU to emulator.
- *
- * @param: aPdu
- *         A hex string representing the whole CBS PDU.
- *
- * Fulfill params:
- *   result -- an array of emulator response lines.
- *
- * Reject params:
- *   result -- an array of emulator response lines.
- *
- * @return A deferred promise.
- */
-function sendRawCbsToEmulator(aPdu) {
-  let command = "cbs pdu " + aPdu;
-  return runEmulatorCmdSafe(command);
-}
-
-/**
- * Wait for one named Cellbroadcast event.
- *
- * Resolve if that named event occurs.  Never reject.
- *
- * Fulfill params: the DOMEvent passed.
- *
- * @param aEventName
- *        A string event name.
- *
- * @return A deferred promise.
- */
-function waitForManagerEvent(aEventName) {
-  let deferred = Promise.defer();
-
-  cbManager.addEventListener(aEventName, function onevent(aEvent) {
-    cbManager.removeEventListener(aEventName, onevent);
-
-    ok(true, "Cellbroadcast event '" + aEventName + "' got.");
-    deferred.resolve(aEvent);
-  });
-
-  return deferred.promise;
-}
-
-/**
- * Send multiple raw CB PDU to emulator and wait
- *
- * @param: aPdus
- *         A array of hex strings. Each represents a CB PDU.
- *         These PDUs are expected to be concatenated into single CB Message.
- *
- * Fulfill params:
- *   result -- array of resolved Promise, where
- *             result[0].message representing the received message.
- *             result[1-n] represents the response of sent emulator command.
- *
- * Reject params:
- *   result -- an array of emulator response lines.
- *
- * @return A deferred promise.
- */
-function sendMultipleRawCbsToEmulatorAndWait(aPdus) {
-  let promises = [];
-
-  promises.push(waitForManagerEvent("received"));
-  for (let pdu of aPdus) {
-    promises.push(sendRawCbsToEmulator(pdu));
-  }
-
-  return Promise.all(promises).then(aResults => aResults[0].message);
-}
-
-/**
- * Wait for pending emulator transactions and call |finish()|.
- */
-function cleanUp() {
-  // Use ok here so that we have at least one test run.
-  ok(true, ":: CLEANING UP ::");
-
-  waitFor(finish, function() {
-    return pendingEmulatorCmdCount === 0;
-  });
-}
-
-/**
- * Switch modem for receving upcoming emulator commands.
- *
- * @param: aServiceId
- *         The id of the modem to be switched to.
- *
- * Fulfill params:
- *   result -- an array of emulator response lines.
- *
- * Reject params:
- *   result -- an array of emulator response lines.
- *
- * @return A deferred promise.
- */
-function selectModem(aServiceId) {
-  let command = "mux modem " + aServiceId;
-  return runEmulatorCmdSafe(command);
-}
-
-/**
- * Helper to run the test case only needed in Multi-SIM environment.
- *
- * @param  aTest
- *         A function which will be invoked w/o parameter.
- * @return a Promise object.
- */
-function runIfMultiSIM(aTest) {
-  let numRIL;
-  try {
-    numRIL = SpecialPowers.getIntPref("ril.numRadioInterfaces");
-  } catch (ex) {
-    numRIL = 1;  // Pref not set.
-  }
-
-  if (numRIL > 1) {
-    return aTest();
-  } else {
-    log("Not a Multi-SIM environment. Test is skipped.");
-    return Promise.resolve();
-  }
-}
-
-/**
- * Common test routine helper for cell broadcast tests.
- *
- * This function ensures global |cbManager| variable is available during the
- * process and performs clean-ups as well.
- *
- * @param aTestCaseMain
- *        A function that takes no parameter.
- */
-function startTestCommon(aTestCaseMain) {
-  Promise.resolve()
-         .then(ensureCellBroadcast)
-         .then(aTestCaseMain)
-         .then(cleanUp, function() {
-           ok(false, 'promise rejects during test.');
-           cleanUp();
-         });
-}
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/manifest.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[DEFAULT]
-run-if = buildapp == 'b2g'
-
-[test_cellbroadcast_etws.js]
-[test_cellbroadcast_gsm.js]
-[test_cellbroadcast_gsm_language_and_body.js]
-skip-if = true # Bug 1231462
-[test_cellbroadcast_multi_sim.js]
-[test_cellbroadcast_umts.js]
-[test_cellbroadcast_umts_language_and_body.js]
-skip-if = true # Bug 1224992
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_etws.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_ETWS_MessageAttributes() {
-  log("Test receiving ETWS Primary Notification - Message Attributes");
-
-  let verifyCBMessage = (aMessage) => {
-    // Attributes other than `language` and `body` should always be assigned.
-    ok(aMessage.gsmGeographicalScope != null, "aMessage.gsmGeographicalScope");
-    ok(aMessage.messageCode != null, "aMessage.messageCode");
-    ok(aMessage.messageId != null, "aMessage.messageId");
-    ok('language' in aMessage, "aMessage.language");
-    ok(aMessage.language == null, "aMessage.language");
-    ok('body' in aMessage, "aMessage.body");
-    ok(aMessage.body == null, "aMessage.body");
-    is(aMessage.messageClass, "normal", "aMessage.messageClass");
-    ok(aMessage.timestamp != null, "aMessage.timestamp");
-    ok(aMessage.etws != null, "aMessage.etws");
-    ok(aMessage.etws.warningType != null, "aMessage.etws.warningType");
-    ok(aMessage.etws.emergencyUserAlert != null,
-       "aMessage.etws.emergencyUserAlert");
-    ok(aMessage.etws.popup != null, "aMessage.etws.popup");
-
-    // cdmaServiceCategory shall always be unavailable in GMS/UMTS CB message.
-    ok(aMessage.cdmaServiceCategory == null, "aMessage.cdmaServiceCategory");
-  };
-
-  // Here we use a simple ETWS message for test.
-  let pdu = buildHexStr(0, CB_MESSAGE_SIZE_ETWS * 2); // 6 octets
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_ETWS_GeographicalScope() {
-  log("Test receiving ETWS Primary Notification - Geographical Scope");
-
-  let promise = Promise.resolve();
-
-  let verifyCBMessage = (aMessage, aGsName) => {
-    is(aMessage.gsmGeographicalScope, aGsName,
-       "aMessage.gsmGeographicalScope");
-  };
-
-  CB_GSM_GEOGRAPHICAL_SCOPE_NAMES.forEach(function(aGsName, aIndex) {
-    let pdu = buildHexStr(((aIndex & 0x03) << 14), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 2) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aGsName));
-  });
-
-  return promise;
-}
-
-function testReceiving_ETWS_MessageCode() {
-  log("Test receiving ETWS Primary Notification - Message Code");
-
-  let promise = Promise.resolve();
-
-  // Message Code has 10 bits, and is ORed into a 16 bits 'serial' number. Here
-  // we test every single bit to verify the operation doesn't go wrong.
-  let messageCodes = [
-    0x000, 0x001, 0x002, 0x004, 0x008, 0x010, 0x020, 0x040,
-    0x080, 0x100, 0x200, 0x251
-  ];
-
-  let verifyCBMessage = (aMessage, aMsgCode) => {
-    is(aMessage.messageCode, aMsgCode, "aMessage.messageCode");
-  };
-
-  messageCodes.forEach(function(aMsgCode) {
-    let pdu = buildHexStr(((aMsgCode & 0x3FF) << 4), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 2) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMsgCode));
-  });
-
-  return promise;
-}
-
-function testReceiving_ETWS_MessageId() {
-  log("Test receiving ETWS Primary Notification - Message Identifier");
-
-  let promise = Promise.resolve();
-
-  // Message Identifier has 16 bits, but no bitwise operation is needed.
-  // Test some selected values only.
-  let messageIds = [
-    0x0000, 0x0001, 0x0010, 0x0100, 0x1111, 0x8888, 0x8811,
-  ];
-
-  let verifyCBMessage = (aMessage, aMessageId) => {
-    is(aMessage.messageId, aMessageId, "aMessage.messageId");
-  };
-
-  messageIds.forEach(function(aMessageId) {
-    let pdu = buildHexStr(0, 4)
-            + buildHexStr((aMessageId & 0xFFFF), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 4) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMessageId));
-  });
-
-  return promise;
-}
-
-function testReceiving_ETWS_Timestamp() {
-  log("Test receiving ETWS Primary Notification - Timestamp");
-
-  let verifyCBMessage = (aMessage) => {
-    // Cell Broadcast messages do not contain a timestamp field (however, ETWS
-    // does). We only check the timestamp doesn't go too far (60 seconds) here.
-    let msMessage = aMessage.timestamp;
-    let msNow = Date.now();
-    ok(Math.abs(msMessage - msNow) < (1000 * 60), "aMessage.timestamp");
-  };
-
-  // Here we use a simple ETWS message for test.
-  let pdu = buildHexStr(0, 12); // 6 octets
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_ETWS_WarningType() {
-  log("Test receiving ETWS Primary Notification - Warning Type");
-
-  let promise = Promise.resolve();
-
-  // Warning Type has 7 bits, and is ORed into a 16 bits 'WarningType' field.
-  // Here we test every single bit to verify the operation doesn't go wrong.
-  let warningTypes = [
-    0x00, 0x01, 0x02, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x41
-  ];
-
-  let verifyCBMessage = (aMessage, aWarningType) => {
-    ok(aMessage.etws, "aMessage.etws");
-    is(aMessage.etws.warningType, CB_ETWS_WARNING_TYPE_NAMES[aWarningType],
-       "aMessage.etws.warningType");
-  };
-
-  warningTypes.forEach(function(aWarningType) {
-    let pdu = buildHexStr(0, 8)
-            + buildHexStr(((aWarningType & 0x7F) << 9), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 6) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aWarningType));
-  });
-
-  return promise;
-}
-
-function testReceiving_ETWS_EmergencyUserAlert() {
-  log("Test receiving ETWS Primary Notification - Emergency User Alert");
-
-  let promise = Promise.resolve();
-
-  let emergencyUserAlertMasks = [0x100, 0x000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.emergencyUserAlert, aMask != 0, "aMessage.etws.emergencyUserAlert");
-  };
-
-  emergencyUserAlertMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(0, 8)
-            + buildHexStr(aMask, 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 6) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-function testReceiving_ETWS_Popup() {
-  log("Test receiving ETWS Primary Notification - Popup");
-
-  let promise = Promise.resolve();
-
-  let popupMasks = [0x80, 0x000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.popup, aMask != 0, "aMessage.etws.popup");
-  };
-
-  popupMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(0, 8)
-            + buildHexStr(aMask, 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_ETWS - 6) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-startTestCommon(function testCaseMain() {
-  return testReceiving_ETWS_MessageAttributes()
-    .then(() => testReceiving_ETWS_GeographicalScope())
-    .then(() => testReceiving_ETWS_MessageCode())
-    .then(() => testReceiving_ETWS_MessageId())
-    .then(() => testReceiving_ETWS_Timestamp())
-    .then(() => testReceiving_ETWS_WarningType())
-    .then(() => testReceiving_ETWS_EmergencyUserAlert())
-    .then(() => testReceiving_ETWS_Popup());
-});
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js
+++ /dev/null
@@ -1,304 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 90000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_GSM_MessageAttributes() {
-  log("Test receiving GSM Cell Broadcast - Message Attributes");
-
-  let verifyCBMessage = (aMessage) => {
-    // Attributes other than `language` and `body` should always be assigned.
-    ok(aMessage.gsmGeographicalScope != null, "aMessage.gsmGeographicalScope");
-    ok(aMessage.messageCode != null, "aMessage.messageCode");
-    ok(aMessage.messageId != null, "aMessage.messageId");
-    ok(aMessage.language != null, "aMessage.language");
-    ok(aMessage.body != null, "aMessage.body");
-    ok(aMessage.messageClass != null, "aMessage.messageClass");
-    ok(aMessage.timestamp != null, "aMessage.timestamp");
-    ok('etws' in aMessage, "aMessage.etws");
-    if (aMessage.etws) {
-      ok('warningType' in aMessage.etws, "aMessage.etws.warningType");
-      ok(aMessage.etws.emergencyUserAlert != null, "aMessage.etws.emergencyUserAlert");
-      ok(aMessage.etws.popup != null, "aMessage.etws.popup");
-    }
-
-    // cdmaServiceCategory shall always be unavailable in GMS/UMTS CB message.
-    ok(aMessage.cdmaServiceCategory == null, "aMessage.cdmaServiceCategory");
-  };
-
-  // Here we use a simple GSM message for test.
-  let pdu = buildHexStr(0, CB_MESSAGE_SIZE_GSM * 2);
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_GSM_GeographicalScope() {
-  log("Test receiving GSM Cell Broadcast - Geographical Scope");
-
-  let promise = Promise.resolve();
-
-  let verifyCBMessage = (aMessage, aGsName) => {
-    is(aMessage.gsmGeographicalScope, aGsName,
-       "aMessage.gsmGeographicalScope");
-  };
-
-  CB_GSM_GEOGRAPHICAL_SCOPE_NAMES.forEach(function(aGsName, aIndex) {
-    let pdu = buildHexStr(((aIndex & 0x03) << 14), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 2) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aGsName));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_MessageCode() {
-  log("Test receiving GSM Cell Broadcast - Message Code");
-
-  let promise = Promise.resolve();
-
-  // Message Code has 10 bits, and is ORed into a 16 bits 'serial' number. Here
-  // we test every single bit to verify the operation doesn't go wrong.
-  let messageCodes = [
-    0x000, 0x001, 0x002, 0x004, 0x008, 0x010, 0x020, 0x040,
-    0x080, 0x100, 0x200, 0x251
-  ];
-
-  let verifyCBMessage = (aMessage, aMsgCode) => {
-    is(aMessage.messageCode, aMsgCode, "aMessage.messageCode");
-  };
-
-  messageCodes.forEach(function(aMsgCode) {
-    let pdu = buildHexStr(((aMsgCode & 0x3FF) << 4), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 2) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMsgCode));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_MessageId() {
-  log("Test receiving GSM Cell Broadcast - Message Identifier");
-
-  let promise = Promise.resolve();
-
-  // Message Identifier has 16 bits, but no bitwise operation is needed.
-  // Test some selected values only.
-  let messageIds = [
-    0x0000, 0x0001, 0x0010, 0x0100, 0x1111, 0x8888, 0x8811,
-  ];
-
-  let verifyCBMessage = (aMessage, aMessageId) => {
-    is(aMessage.messageId, aMessageId, "aMessage.messageId");
-    ok(aMessage.etws == null, "aMessage.etws");
-  };
-
-  messageIds.forEach(function(aMessageId) {
-    let pdu = buildHexStr(0, 4)
-            + buildHexStr((aMessageId & 0xFFFF), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 4) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMessageId));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_Timestamp() {
-  log("Test receiving GSM Cell Broadcast - Timestamp");
-
-  let verifyCBMessage = (aMessage) => {
-    // Cell Broadcast messages do not contain a timestamp field (however, ETWS
-    // does). We only check the timestamp doesn't go too far (60 seconds) here.
-    let msMessage = aMessage.timestamp;
-    let msNow = Date.now();
-    ok(Math.abs(msMessage - msNow) < (1000 * 60), "aMessage.timestamp");
-  };
-
-  let pdu = buildHexStr(0, CB_MESSAGE_SIZE_GSM * 2);
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_GSM_WarningType() {
-  log("Test receiving GSM Cell Broadcast - Warning Type");
-
-  let promise = Promise.resolve();
-
-  let messageIds = [];
-  for (let i = CB_GSM_MESSAGEID_ETWS_BEGIN; i <= CB_GSM_MESSAGEID_ETWS_END; i++) {
-    messageIds.push(i);
-  }
-
-  let verifyCBMessage = (aMessage, aMessageId) => {
-    is(aMessage.messageId, aMessageId, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-
-    let offset = aMessageId - CB_GSM_MESSAGEID_ETWS_BEGIN;
-    if (offset < CB_ETWS_WARNING_TYPE_NAMES.length) {
-      is(aMessage.etws.warningType, CB_ETWS_WARNING_TYPE_NAMES[offset],
-         "aMessage.etws.warningType");
-    } else {
-      ok(aMessage.etws.warningType == null, "aMessage.etws.warningType");
-    }
-  };
-
-  messageIds.forEach(function(aMessageId) {
-    let pdu = buildHexStr(0, 4)
-            + buildHexStr((aMessageId & 0xFFFF), 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 4) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMessageId));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_EmergencyUserAlert() {
-  log("Test receiving GSM Cell Broadcast - Emergency User Alert");
-
-  let promise = Promise.resolve();
-
-  let emergencyUserAlertMasks = [0x2000, 0x0000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    is(aMessage.messageId, CB_GSM_MESSAGEID_ETWS_BEGIN, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.emergencyUserAlert, aMask != 0, "aMessage.etws.emergencyUserAlert");
-  };
-
-  emergencyUserAlertMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(aMask, 4)
-            + buildHexStr(CB_GSM_MESSAGEID_ETWS_BEGIN, 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 4) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_Popup() {
-  log("Test receiving GSM Cell Broadcast - Popup");
-
-  let promise = Promise.resolve();
-
-  let popupMasks = [0x1000, 0x0000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    is(aMessage.messageId, CB_GSM_MESSAGEID_ETWS_BEGIN, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.popup, aMask != 0, "aMessage.etws.popup");
-  };
-
-  popupMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(aMask, 4)
-            + buildHexStr(CB_GSM_MESSAGEID_ETWS_BEGIN, 4)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 4) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_Multipart() {
-  log("Test receiving GSM Cell Broadcast - Multipart Messages");
-
-  let promise = Promise.resolve();
-
-  // According to 9.4.1.2.4 Page Parameter in TS 23.041, the maximal Number of
-  // pages per CB message is 15.
-  let numParts = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
-
-  let verifyCBMessage = (aMessage, aNumParts) => {
-      is(aMessage.body.length, (aNumParts * CB_MAX_CONTENT_PER_PAGE_7BIT),
-         "aMessage.body");
-  };
-
-  numParts.forEach(function(aNumParts) {
-    let pdus = [];
-    for (let i = 1; i <= aNumParts; i++) {
-      let pdu = buildHexStr(0, 10)
-              + buildHexStr((i << 4) + aNumParts, 2)
-              + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 6) * 2);
-      pdus.push(pdu);
-    }
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait(pdus))
-      .then((aMessage) => verifyCBMessage(aMessage, aNumParts));
-  });
-
-  return promise;
-}
-
-function testReceiving_GSM_PaddingCharacters() {
-  log("Test receiving GSM Cell Broadcast - Padding Characters <CR>");
-
-  let promise = Promise.resolve();
-
-  let testContents = [
-    { pdu:
-        // CB PDU with GSM 7bit encoded text of
-        // "The quick brown fox jumps over the lazy dog
-        //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-        //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-        //  \r\r\r\r\r\r\r\r"
-        "C0020001011154741914AFA7C76B9058" +
-        "FEBEBB41E6371EA4AEB7E173D0DB5E96" +
-        "83E8E832881DD6E741E4F7B9D168341A" +
-        "8D46A3D168341A8D46A3D168341A8D46" +
-        "A3D168341A8D46A3D168341A8D46A3D1" +
-        "68341A8D46A3D100",
-      text:
-        "The quick brown fox jumps over the lazy dog"
-    },
-    { pdu:
-        // CB PDU with UCS2 encoded text of
-        // "The quick brown fox jumps over\r\r\r\r\r\r\r\r\r\r\r"
-        "C0020001481100540068006500200071" +
-        "007500690063006b002000620072006f" +
-        "0077006e00200066006f00780020006a" +
-        "0075006d007000730020006f00760065" +
-        "0072000D000D000D000D000D000D000D" +
-        "000D000D000D000D",
-      text:
-        "The quick brown fox jumps over"
-    }
-  ];
-
-  let verifyCBMessage = (aMessage, aText) => {
-    is(aMessage.body, aText, "aMessage.body");
-  };
-
-  testContents.forEach(function(aTestContent) {
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([aTestContent.pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aTestContent.text));
-  });
-
-  return promise;
-}
-
-startTestCommon(function testCaseMain() {
-  return testReceiving_GSM_MessageAttributes()
-    .then(() => testReceiving_GSM_GeographicalScope())
-    .then(() => testReceiving_GSM_MessageCode())
-    .then(() => testReceiving_GSM_MessageId())
-    .then(() => testReceiving_GSM_Timestamp())
-    .then(() => testReceiving_GSM_WarningType())
-    .then(() => testReceiving_GSM_EmergencyUserAlert())
-    .then(() => testReceiving_GSM_Popup())
-    .then(() => testReceiving_GSM_Multipart())
-    .then(() => testReceiving_GSM_PaddingCharacters());
-});
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm_language_and_body.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 90000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_GSM_Language_and_Body() {
-  log("Test receiving GSM Cell Broadcast - Language & Body");
-
-  let promise = Promise.resolve();
-
-  let testDcs = [];
-  let dcs = 0;
-  while (dcs <= 0xFF) {
-    try {
-      let dcsInfo = { dcs: dcs };
-      [ dcsInfo.encoding, dcsInfo.language,
-        dcsInfo.indicator, dcsInfo.messageClass ] = decodeGsmDataCodingScheme(dcs);
-      testDcs.push(dcsInfo);
-    } catch (e) {
-      // Unsupported coding group, skip.
-      dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
-    }
-    dcs++;
-  }
-
-  let verifyCBMessage = (aMessage, aDcsInfo) => {
-    if (aDcsInfo.language) {
-      is(aMessage.language, aDcsInfo.language, "aMessage.language");
-    } else if (aDcsInfo.indicator) {
-      is(aMessage.language, "@@", "aMessage.language");
-    } else {
-      ok(aMessage.language == null, "aMessage.language");
-    }
-
-    switch (aDcsInfo.encoding) {
-      case PDU_DCS_MSG_CODING_7BITS_ALPHABET:
-        is(aMessage.body, aDcsInfo.indicator ? DUMMY_BODY_7BITS_IND : DUMMY_BODY_7BITS, "aMessage.body");
-        break;
-      case PDU_DCS_MSG_CODING_8BITS_ALPHABET:
-        ok(aMessage.body == null, "aMessage.body");
-        break;
-      case PDU_DCS_MSG_CODING_16BITS_ALPHABET:
-        is(aMessage.body, aDcsInfo.indicator ? DUMMY_BODY_UCS2_IND : DUMMY_BODY_UCS2, "aMessage.body");
-        break;
-    }
-
-    is(aMessage.messageClass, aDcsInfo.messageClass, "aMessage.messageClass");
-  };
-
-  ok(testDcs.length, "testDcs.length");
-  testDcs.forEach(function(aDcsInfo) {
-    let pdu = buildHexStr(0, 8)
-            + buildHexStr(aDcsInfo.dcs, 2)
-            + buildHexStr(0, (CB_MESSAGE_SIZE_GSM - 5) * 2);
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aDcsInfo));
-  });
-
-  return promise;
-}
-
-startTestCommon(() => testReceiving_GSM_Language_and_Body());
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_multi_sim.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 60000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_MultiSIM() {
-  log("Test receiving GSM Cell Broadcast - Multi-SIM");
-
-  let pdu = buildHexStr(0, CB_MESSAGE_SIZE_GSM * 2);
-
-  let verifyCBMessage = (aMessage, aServiceId) => {
-    log("Verify CB message received from serviceId: " + aServiceId);
-    is(aMessage.body, DUMMY_BODY_7BITS, "Checking message body.");
-    is(aMessage.serviceId, aServiceId, "Checking serviceId.");
-  };
-
-  return selectModem(1)
-    .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-    .then((aMessage) => verifyCBMessage(aMessage, 1))
-    .then(() => selectModem(0))
-    .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-    .then((aMessage) => verifyCBMessage(aMessage, 0));
-}
-
-startTestCommon(function testCaseMain() {
-  return runIfMultiSIM(testReceiving_MultiSIM);
-});
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js
+++ /dev/null
@@ -1,387 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 90000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_UMTS_MessageAttributes() {
-  log("Test receiving UMTS Cell Broadcast - Message Attributes");
-
-  let verifyCBMessage = (aMessage) => {
-    // Attributes other than `language` , `body` and `data` should always be assigned.
-    ok(aMessage.gsmGeographicalScope != null, "aMessage.gsmGeographicalScope");
-    ok(aMessage.messageCode != null, "aMessage.messageCode");
-    ok(aMessage.messageId != null, "aMessage.messageId");
-    ok(aMessage.messageClass != null, "aMessage.messageClass");
-    ok(aMessage.timestamp != null, "aMessage.timestamp");
-    ok('etws' in aMessage, "aMessage.etws");
-    if (aMessage.etws) {
-      ok('warningType' in aMessage.etws, "aMessage.etws.warningType");
-      ok(aMessage.etws.emergencyUserAlert != null, "aMessage.etws.emergencyUserAlert");
-      ok(aMessage.etws.popup != null, "aMessage.etws.popup");
-    }
-
-    // cdmaServiceCategory shall always be unavailable in GMS/UMTS CB message.
-    ok(aMessage.cdmaServiceCategory == null, "aMessage.cdmaServiceCategory");
-  };
-
-  // Here we use a single UMTS message for test.
-  let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-          + buildHexStr(0, 10) // skip msg_id, sn, dcs
-          + buildHexStr(1, 2)  // set num_of_pages to 1
-          + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-          + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_UMTS_GeographicalScope() {
-  log("Test receiving UMTS Cell Broadcast - Geographical Scope");
-
-  let promise = Promise.resolve();
-
-  let verifyCBMessage = (aMessage, aGsName) => {
-    is(aMessage.gsmGeographicalScope, aGsName,
-       "aMessage.gsmGeographicalScope");
-  };
-
-  CB_GSM_GEOGRAPHICAL_SCOPE_NAMES.forEach(function(aGsName, aIndex) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(0, 4) // skip msg_id
-            + buildHexStr(((aIndex & 0x03) << 14), 4) // set SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aGsName));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_MessageCode() {
-  log("Test receiving UMTS Cell Broadcast - Message Code");
-
-  let promise = Promise.resolve();
-
-  // Message Code has 10 bits, and is ORed into a 16 bits 'serial' number. Here
-  // we test every single bit to verify the operation doesn't go wrong.
-  let messageCodes = [
-    0x000, 0x001, 0x002, 0x004, 0x008, 0x010, 0x020, 0x040,
-    0x080, 0x100, 0x200, 0x251
-  ];
-
-  let verifyCBMessage = (aMessage, aMsgCode) => {
-    is(aMessage.messageCode, aMsgCode, "aMessage.messageCode");
-  };
-
-  messageCodes.forEach(function(aMsgCode) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(0, 4) // skip msg_id
-            + buildHexStr(((aMsgCode & 0x3FF) << 4), 4) // set SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMsgCode));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_MessageId() {
-  log("Test receiving UMTS Cell Broadcast - Message Identifier");
-
-  let promise = Promise.resolve();
-
-  // Message Identifier has 16 bits, but no bitwise operation is needed.
-  // Test some selected values only.
-  let messageIds = [
-    0x0000, 0x0001, 0x0010, 0x0100, 0x1111, 0x8888, 0x8811,
-  ];
-
-  let verifyCBMessage = (aMessage, aMessageId) => {
-    is(aMessage.messageId, aMessageId, "aMessage.messageId");
-    ok(aMessage.etws == null, "aMessage.etws");
-  };
-
-  messageIds.forEach(function(aMessageId) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr((aMessageId & 0xFFFF), 4) // set msg_id
-            + buildHexStr(0, 4) // skip SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2);  // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMessageId));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_Timestamp() {
-  log("Test receiving UMTS Cell Broadcast - Timestamp");
-
-  let verifyCBMessage = (aMessage) => {
-    // Cell Broadcast messages do not contain a timestamp field (however, ETWS
-    // does). We only check the timestamp doesn't go too far (60 seconds) here.
-    let msMessage = aMessage.timestamp;
-    let msNow = Date.now();
-    ok(Math.abs(msMessage - msNow) < (1000 * 60), "aMessage.timestamp");
-  };
-
-  // Here we use a single UMTS message for test.
-  let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-          + buildHexStr(0, 10) // skip msg_id, sn, dcs
-          + buildHexStr(1, 2)  // set num_of_pages to 1
-          + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-          + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-function testReceiving_UMTS_WarningType() {
-  log("Test receiving UMTS Cell Broadcast - Warning Type");
-
-  let promise = Promise.resolve();
-
-  let messageIds = [];
-  for (let i = CB_GSM_MESSAGEID_ETWS_BEGIN; i <= CB_GSM_MESSAGEID_ETWS_END; i++) {
-    messageIds.push(i);
-  }
-
-  let verifyCBMessage = (aMessage, aMessageId) => {
-    is(aMessage.messageId, aMessageId, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-
-    let offset = aMessageId - CB_GSM_MESSAGEID_ETWS_BEGIN;
-    if (offset < CB_ETWS_WARNING_TYPE_NAMES.length) {
-      is(aMessage.etws.warningType, CB_ETWS_WARNING_TYPE_NAMES[offset],
-         "aMessage.etws.warningType");
-    } else {
-      ok(aMessage.etws.warningType == null, "aMessage.etws.warningType");
-    }
-  };
-
-  messageIds.forEach(function(aMessageId) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr((aMessageId & 0xFFFF), 4) // set msg_id
-            + buildHexStr(0, 4) // skip SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMessageId));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_EmergencyUserAlert() {
-  log("Test receiving UMTS Cell Broadcast - Emergency User Alert");
-
-  let promise = Promise.resolve();
-
-  let emergencyUserAlertMasks = [0x2000, 0x0000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    is(aMessage.messageId, CB_GSM_MESSAGEID_ETWS_BEGIN, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.emergencyUserAlert, aMask != 0, "aMessage.etws.emergencyUserAlert");
-  };
-
-  emergencyUserAlertMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(CB_GSM_MESSAGEID_ETWS_BEGIN, 4) // set msg_id
-            + buildHexStr(aMask, 4) // set SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_Popup() {
-  log("Test receiving UMTS Cell Broadcast - Popup");
-
-  let promise = Promise.resolve();
-
-  let popupMasks = [0x1000, 0x0000];
-
-  let verifyCBMessage = (aMessage, aMask) => {
-    is(aMessage.messageId, CB_GSM_MESSAGEID_ETWS_BEGIN, "aMessage.messageId");
-    ok(aMessage.etws != null, "aMessage.etws");
-    is(aMessage.etws.popup, aMask != 0, "aMessage.etws.popup");
-  };
-
-  popupMasks.forEach(function(aMask) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(CB_GSM_MESSAGEID_ETWS_BEGIN, 4) // set msg_id
-            + buildHexStr(aMask, 4) // set SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aMask));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_Multipart() {
-  log("Test receiving UMTS Cell Broadcast - Multipart Messages");
-
-  let promise = Promise.resolve();
-
-  // According to 9.4.2.2.5 CB Data in TS 23.041,
-  // Number-of-Pages is equal to or less than 15.
-  // However, the size of out_buff of android modem in emulator is fixed to 1024.
-  // The maximal number of CBS pages we can test is limited to 6.
-  // Another xpc shell test case in ril_worker will address this instead.
-  let numOfPages = [1, 2, 3, 4, 5, 6];
-
-  let verifyCBMessage = (aMessage, aNumOfPages) => {
-      is(aMessage.body.length, (aNumOfPages * CB_MAX_CONTENT_PER_PAGE_7BIT),
-         "aMessage.body");
-  };
-
-  numOfPages.forEach(function(aNumOfPages) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(0, 4) // skip msg_id
-            + buildHexStr(0, 4) // skip SN
-            + buildHexStr(0, 2) // skip dcs
-            + buildHexStr(aNumOfPages, 2); // set num_of_pages
-    for (let i = 1; i <= aNumOfPages; i++) {
-      pdu = pdu + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-                + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    }
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aNumOfPages));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_PaddingCharacters() {
-  log("Test receiving UMTS Cell Broadcast - Padding Characters <CR>");
-
-  let promise = Promise.resolve();
-
-  let testContents = [
-    { pdu:
-        // CB PDU with GSM 7bit encoded text of
-        // "The quick brown fox jumps over the lazy dog
-        //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-        //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-        //  \r\r\r\r\r\r\r\r"
-        buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) + // msg_type
-        buildHexStr(0, 4) + // skip msg_id
-        buildHexStr(0, 4) + // skip SN
-        buildHexStr(0, 2) + // set dcs
-        buildHexStr(1, 2) + // set num_of_pages to 1
-        "54741914AFA7C76B9058FEBEBB41E637" +
-        "1EA4AEB7E173D0DB5E9683E8E832881D" +
-        "D6E741E4F7B9D168341A8D46A3D16834" +
-        "1A8D46A3D168341A8D46A3D168341A8D" +
-        "46A3D168341A8D46A3D168341A8D46A3" +
-        "D100" +
-        buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2),  // msg_info_length
-      text:
-        "The quick brown fox jumps over the lazy dog"
-    },
-    { pdu:
-        // CB PDU with UCS2 encoded text of
-        // "The quick brown fox jumps over\r\r\r\r\r\r\r\r\r\r\r"
-        buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) + // msg_type
-        buildHexStr(0, 4) + // skip msg_id
-        buildHexStr(0, 4) + // skip SN
-        buildHexStr(72, 2) + // set dcs
-        buildHexStr(1, 2) + // set num_of_pages to 1
-        "00540068006500200071007500690063" +
-        "006b002000620072006f0077006e0020" +
-        "0066006f00780020006a0075006d0070" +
-        "00730020006f007600650072000D000D" +
-        "000D000D000D000D000D000D000D000D" +
-        "000D" +
-        buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2),  // msg_info_length
-      text:
-        "The quick brown fox jumps over"
-    }
-  ];
-
-  let verifyCBMessage = (aMessage, aText) => {
-    is(aMessage.body, aText, "aMessage.body");
-  };
-
-  testContents.forEach(function(aTestContent) {
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([aTestContent.pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aTestContent.text));
-  });
-
-  return promise;
-}
-
-function testReceiving_UMTS_MessageInformationLength() {
-  log("Test receiving UMTS Cell Broadcast - Message Information Length");
-
-  let testText = "The quick brown fox jumps over the lazy dog";
-
-  let verifyCBMessage = (aMessage) => {
-    is(aMessage.body, testText, "aMessage.body");
-  };
-
-  // CB PDU with GSM 7bit encoded text of
-  // "The quick brown fox jumps over the lazy dog
-  //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-  //  \r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r
-  //  \r\r\r\r\r\r\r\r"
-  //  We set msg_info_length to the number of used octets.
-  let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-          + buildHexStr(0, 4) // skip msg_id
-          + buildHexStr(0, 4) // skip SN
-          + buildHexStr(0, 2) // set dcs
-          + buildHexStr(1, 2) // set num_of_pages to 1
-          + "54741914AFA7C76B9058FEBEBB41E637"
-          + "1EA4AEB7E173D0DB5E9683E8E832881D"
-          + "D6E741E4F7B9D168341A8D46A3D16834"
-          + "1A8D46A3D168341A8D46A3D168341A8D"
-          + "46A3D168341A8D46A3D168341A8D46A3"
-          + "D100"
-          + buildHexStr(Math.ceil(testText.length * 7 / 8), 2); // msg_info_length
-
-  return sendMultipleRawCbsToEmulatorAndWait([pdu])
-    .then((aMessage) => verifyCBMessage(aMessage));
-}
-
-startTestCommon(function testCaseMain() {
-  return testReceiving_UMTS_MessageAttributes()
-  .then(() => testReceiving_UMTS_GeographicalScope())
-  .then(() => testReceiving_UMTS_MessageCode())
-  .then(() => testReceiving_UMTS_MessageId())
-  .then(() => testReceiving_UMTS_Timestamp())
-  .then(() => testReceiving_UMTS_WarningType())
-  .then(() => testReceiving_UMTS_EmergencyUserAlert())
-  .then(() => testReceiving_UMTS_Popup())
-  .then(() => testReceiving_UMTS_Multipart())
-  .then(() => testReceiving_UMTS_PaddingCharacters())
-  .then(() => testReceiving_UMTS_MessageInformationLength());
-});
deleted file mode 100644
--- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts_language_and_body.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-MARIONETTE_TIMEOUT = 90000;
-MARIONETTE_HEAD_JS = 'head.js';
-
-function testReceiving_UMTS_Language_and_Body() {
-  log("Test receiving UMTS Cell Broadcast - Language & Body");
-
-  let promise = Promise.resolve();
-
-  let testDcs = [];
-  let dcs = 0;
-  while (dcs <= 0xFF) {
-    try {
-      let dcsInfo = { dcs: dcs };
-      [ dcsInfo.encoding, dcsInfo.language,
-        dcsInfo.indicator, dcsInfo.messageClass ] = decodeGsmDataCodingScheme(dcs);
-      testDcs.push(dcsInfo);
-    } catch (e) {
-      // Unsupported coding group, skip.
-      dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10;
-    }
-    dcs++;
-  }
-
-  let verifyCBMessage = (aMessage, aDcsInfo) => {
-    if (aDcsInfo.language) {
-      is(aMessage.language, aDcsInfo.language, "aMessage.language");
-    } else if (aDcsInfo.indicator) {
-      is(aMessage.language, "@@", "aMessage.language");
-    } else {
-      ok(aMessage.language == null, "aMessage.language");
-    }
-
-    switch (aDcsInfo.encoding) {
-      case PDU_DCS_MSG_CODING_7BITS_ALPHABET:
-        is(aMessage.body,
-           aDcsInfo.indicator ? DUMMY_BODY_7BITS_IND : DUMMY_BODY_7BITS,
-           "aMessage.body");
-        break;
-      case PDU_DCS_MSG_CODING_8BITS_ALPHABET:
-        ok(aMessage.body == null, "aMessage.body");
-        break;
-      case PDU_DCS_MSG_CODING_16BITS_ALPHABET:
-        is(aMessage.body,
-           aDcsInfo.indicator ? DUMMY_BODY_UCS2_IND : DUMMY_BODY_UCS2,
-           "aMessage.body");
-        break;
-    }
-
-    is(aMessage.messageClass, aDcsInfo.messageClass, "aMessage.messageClass");
-  };
-
-  testDcs.forEach(function(aDcsInfo) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(0, 4) // skip msg_id
-            + buildHexStr(0, 4) // skip SN
-            + buildHexStr(aDcsInfo.dcs, 2) // set dcs
-            + buildHexStr(1, 2) // set num_of_pages to 1
-            + buildHexStr(0, CB_UMTS_MESSAGE_PAGE_SIZE * 2)
-            + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2);  // msg_info_length
-    promise = promise
-      .then(() => sendMultipleRawCbsToEmulatorAndWait([pdu]))
-      .then((aMessage) => verifyCBMessage(aMessage, aDcsInfo));
-  });
-
-  return promise;
-}
-
-startTestCommon(() => testReceiving_UMTS_Language_and_Body());
--- a/dom/events/test/test_all_synthetic_events.html
+++ b/dom/events/test/test_all_synthetic_events.html
@@ -327,20 +327,16 @@ const kEventConstructors = {
                                                                                 aProps.button, aProps.relatedTarget, aProps.axis);
                                                          return e;
                                                        },
                                              },
   MozApplicationEvent:                       { create: function (aName, aProps) {
                                                          return new MozApplicationEvent(aName, aProps);
                                                        },
                                              },
-  MozCellBroadcastEvent:                     { create: function (aName, aProps) {
-                                                          return new MozCellBroadcastEvent(aName, aProps);
-                                                       },
-                                             },
   MozClirModeEvent:                          { create: function (aName, aProps) {
                                                          return new MozClirModeEvent(aName, aProps);
                                                        },
                                              },
   MozContactChangeEvent:                     { create: function (aName, aProps) {
                                                          return new MozContactChangeEvent(aName, aProps);
                                                        },
                                              },
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -165,17 +165,16 @@
 #include "mozilla/X11Util.h"
 #endif
 
 #ifdef ACCESSIBILITY
 #include "nsAccessibilityService.h"
 #endif
 
 #include "mozilla/dom/File.h"
-#include "mozilla/dom/cellbroadcast/CellBroadcastIPCService.h"
 #include "mozilla/dom/icc/IccChild.h"
 #include "mozilla/dom/mobileconnection/MobileConnectionChild.h"
 #include "mozilla/dom/mobilemessage/SmsChild.h"
 #include "mozilla/dom/devicestorage/DeviceStorageRequestChild.h"
 #include "mozilla/dom/bluetooth/PBluetoothChild.h"
 #include "mozilla/dom/PFMRadioChild.h"
 #include "mozilla/dom/PPresentationChild.h"
 #include "mozilla/dom/PresentationIPCService.h"
@@ -202,17 +201,16 @@
 #include "GMPDecoderModule.h"
 #include "gfxPlatform.h"
 #include "nscore.h" // for NS_FREE_PERMANENT_DATA
 #include "VRManagerChild.h"
 
 using namespace mozilla;
 using namespace mozilla::docshell;
 using namespace mozilla::dom::bluetooth;
-using namespace mozilla::dom::cellbroadcast;
 using namespace mozilla::dom::devicestorage;
 using namespace mozilla::dom::icc;
 using namespace mozilla::dom::ipc;
 using namespace mozilla::dom::mobileconnection;
 using namespace mozilla::dom::mobilemessage;
 using namespace mozilla::dom::telephony;
 using namespace mozilla::dom::voicemail;
 using namespace mozilla::dom::workers;
@@ -1977,40 +1975,16 @@ ContentChild::AllocPHandlerServiceChild(
 }
 
 bool ContentChild::DeallocPHandlerServiceChild(PHandlerServiceChild* aHandlerServiceChild)
 {
   static_cast<HandlerServiceChild*>(aHandlerServiceChild)->Release();
   return true;
 }
 
-PCellBroadcastChild*
-ContentChild::AllocPCellBroadcastChild()
-{
-  MOZ_CRASH("No one should be allocating PCellBroadcastChild actors");
-}
-
-PCellBroadcastChild*
-ContentChild::SendPCellBroadcastConstructor(PCellBroadcastChild* aActor)
-{
-  aActor = PContentChild::SendPCellBroadcastConstructor(aActor);
-  if (aActor) {
-    static_cast<CellBroadcastIPCService*>(aActor)->AddRef();
-  }
-
-  return aActor;
-}
-
-bool
-ContentChild::DeallocPCellBroadcastChild(PCellBroadcastChild* aActor)
-{
-  static_cast<CellBroadcastIPCService*>(aActor)->Release();
-  return true;
-}
-
 PSmsChild*
 ContentChild::AllocPSmsChild()
 {
   return new SmsChild();
 }
 
 bool
 ContentChild::DeallocPSmsChild(PSmsChild* aSms)
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -330,22 +330,16 @@ public:
 
   virtual bool
   DeallocPExternalHelperAppChild(PExternalHelperAppChild *aService) override;
 
   virtual PHandlerServiceChild* AllocPHandlerServiceChild() override;
 
   virtual bool DeallocPHandlerServiceChild(PHandlerServiceChild*) override;
 
-  virtual PCellBroadcastChild* AllocPCellBroadcastChild() override;
-
-  PCellBroadcastChild* SendPCellBroadcastConstructor(PCellBroadcastChild* aActor);
-
-  virtual bool DeallocPCellBroadcastChild(PCellBroadcastChild* aActor) override;
-
   virtual PSmsChild* AllocPSmsChild() override;
 
   virtual bool DeallocPSmsChild(PSmsChild*) override;
 
   virtual PTelephonyChild* AllocPTelephonyChild() override;
 
   virtual bool DeallocPTelephonyChild(PTelephonyChild*) override;
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -50,17 +50,16 @@
 #include "mozilla/dom/Notification.h"
 #include "mozilla/dom/PContentBridgeParent.h"
 #include "mozilla/dom/PContentPermissionRequestParent.h"
 #include "mozilla/dom/PCycleCollectWithLogsParent.h"
 #include "mozilla/dom/PFMRadioParent.h"
 #include "mozilla/dom/PMemoryReportRequestParent.h"
 #include "mozilla/dom/ServiceWorkerRegistrar.h"
 #include "mozilla/dom/bluetooth/PBluetoothParent.h"
-#include "mozilla/dom/cellbroadcast/CellBroadcastParent.h"
 #include "mozilla/dom/devicestorage/DeviceStorageRequestParent.h"
 #include "mozilla/dom/icc/IccParent.h"
 #include "mozilla/dom/mobileconnection/MobileConnectionParent.h"
 #include "mozilla/dom/mobilemessage/SmsParent.h"
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/Permissions.h"
 #include "mozilla/dom/PresentationParent.h"
 #include "mozilla/dom/PPresentationParent.h"
@@ -286,17 +285,16 @@ using base::KillProcess;
 #ifdef MOZ_ENABLE_PROFILER_SPS
 using mozilla::ProfileGatherer;
 #endif
 
 #ifdef MOZ_CRASHREPORTER
 using namespace CrashReporter;
 #endif
 using namespace mozilla::dom::bluetooth;
-using namespace mozilla::dom::cellbroadcast;
 using namespace mozilla::dom::devicestorage;
 using namespace mozilla::dom::icc;
 using namespace mozilla::dom::power;
 using namespace mozilla::dom::mobileconnection;
 using namespace mozilla::dom::mobilemessage;
 using namespace mozilla::dom::telephony;
 using namespace mozilla::dom::voicemail;
 using namespace mozilla::media;
@@ -3460,41 +3458,16 @@ ContentParent::AllocPHandlerServiceParen
 
 bool
 ContentParent::DeallocPHandlerServiceParent(PHandlerServiceParent* aHandlerServiceParent)
 {
   static_cast<HandlerServiceParent*>(aHandlerServiceParent)->Release();
   return true;
 }
 
-PCellBroadcastParent*
-ContentParent::AllocPCellBroadcastParent()
-{
-  if (!AssertAppProcessPermission(this, "cellbroadcast")) {
-    return nullptr;
-  }
-
-  CellBroadcastParent* actor = new CellBroadcastParent();
-  actor->AddRef();
-  return actor;
-}
-
-bool
-ContentParent::DeallocPCellBroadcastParent(PCellBroadcastParent* aActor)
-{
-  static_cast<CellBroadcastParent*>(aActor)->Release();
-  return true;
-}
-
-bool
-ContentParent::RecvPCellBroadcastConstructor(PCellBroadcastParent* aActor)
-{
-  return static_cast<CellBroadcastParent*>(aActor)->Init();
-}
-
 PSmsParent*
 ContentParent::AllocPSmsParent()
 {
   if (!AssertAppProcessPermission(this, "sms")) {
     return nullptr;
   }
 
   SmsParent* parent = new SmsParent();
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -847,22 +847,16 @@ private:
 
   virtual bool
   DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService) override;
 
   virtual PHandlerServiceParent* AllocPHandlerServiceParent() override;
 
   virtual bool DeallocPHandlerServiceParent(PHandlerServiceParent*) override;
 
-  virtual PCellBroadcastParent* AllocPCellBroadcastParent() override;
-
-  virtual bool DeallocPCellBroadcastParent(PCellBroadcastParent*) override;
-
-  virtual bool RecvPCellBroadcastConstructor(PCellBroadcastParent* aActor) override;
-
   virtual PSmsParent* AllocPSmsParent() override;
 
   virtual bool DeallocPSmsParent(PSmsParent*) override;
 
   virtual PTelephonyParent* AllocPTelephonyParent() override;
 
   virtual bool DeallocPTelephonyParent(PTelephonyParent*) override;
 
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -3,17 +3,16 @@
 /* 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 protocol PBackground;
 include protocol PBlob;
 include protocol PBluetooth;
 include protocol PBrowser;
-include protocol PCellBroadcast;
 include protocol PCompositorBridge;
 include protocol PContentBridge;
 include protocol PContentPermissionRequest;
 include protocol PCycleCollectWithLogs;
 include protocol PCrashReporter;
 include protocol PPSMContentDownloader;
 include protocol PExternalHelperApp;
 include protocol PHandlerService;
@@ -384,17 +383,16 @@ prio(normal upto urgent) sync protocol P
     parent opens PProcessHangMonitor;
     parent opens PSharedBufferManager;
     parent opens PGMPService;
     child opens PBackground;
 
     manages PBlob;
     manages PBluetooth;
     manages PBrowser;
-    manages PCellBroadcast;
     manages PContentPermissionRequest;
     manages PCrashReporter;
     manages PCycleCollectWithLogs;
     manages PDeviceStorageRequest;
     manages PPSMContentDownloader;
     manages PExternalHelperApp;
     manages PFileDescriptorSet;
     manages PFMRadio;
@@ -857,18 +855,16 @@ parent:
 
     async PSendStream();
 
     prio(high) sync PScreenManager()
         returns (uint32_t numberOfScreens,
                  float systemDefaultScale,
                  bool success);
 
-    async PCellBroadcast();
-
     async PSms();
 
     async PSpeechSynthesis();
 
     prio(urgent) async PStorage();
 
     async PTelephony();
 
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -42,17 +42,16 @@ DIRS += [
     'base',
     'bluetooth',
     'archivereader',
     'bindings',
     'battery',
     'browser-element',
     'cache',
     'canvas',
-    'cellbroadcast',
     'contacts',
     'crypto',
     'phonenumberutils',
     'devicestorage',
     'encoding',
     'events',
     'fetch',
     'filehandle',
deleted file mode 100644
--- a/dom/permission/tests/test_cellbroadcast.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=815105
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 815105 </title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815105">Mozilla Bug 815105 </a>
-<p id="display"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-<script type="application/javascript;version=1.8" src="file_framework.js"></script>
-<script type="application/javascript;version=1.8">
-var gData = [
-  {
-    perm: ["cellbroadcast"],
-    needParentPerm: true,
-    obj: "mozCellBroadcast",
-    webidl: "MozCellBroadcast",
-    settings: [["dom.cellbroadcast.enabled", true],
-               ["dom.ignore_webidl_scope_checks", true]],
-  },
-]
-</script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/webidl/MozCellBroadcast.webidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-/**
- * Cell Broadcast short message service (CBS) permits a number of
- * unacknowledged general CBS messages to be broadcast to all receivers within
- * a particular region.
- */
-[Pref="dom.cellbroadcast.enabled",
- ChromeOnly]
-interface MozCellBroadcast : EventTarget
-{
-  /**
-   * Cell Broadcast messages received.
-   */
-  attribute EventHandler onreceived;
-};
deleted file mode 100644
--- a/dom/webidl/MozCellBroadcastEvent.webidl
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/.
- */
-
-[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict),
- Pref="dom.cellbroadcast.enabled",
- ChromeOnly]
-interface MozCellBroadcastEvent : Event
-{
-  readonly attribute MozCellBroadcastMessage? message;
-};
-
-dictionary MozCellBroadcastEventInit : EventInit
-{
-  MozCellBroadcastMessage? message = null;
-};
deleted file mode 100644
--- a/dom/webidl/MozCellBroadcastMessage.webidl
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
-/* vim: set ts=2 et sw=2 tw=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/. */
-
-enum CellBroadcastGsmGeographicalScope {"cell-immediate", "plmn",
-                                        "location-area", "cell"};
-enum CellBroadcastMessageClass {"class-0", "class-1", "class-2",
-                                "class-3", "user-1", "user-2", "normal"};
-enum CellBroadcastEtwsWarningType {"earthquake", "tsunami",
-                                   "earthquake-tsunami", "test", "other"};
-
-[Pref="dom.cellbroadcast.enabled",
- ChromeOnly]
-interface MozCellBroadcastMessage
-{
-  /**
-   * The Service Id in the device where the message is received from.
-   */
-  readonly attribute unsigned long serviceId;
-
-  /**
-   * Indication of the geographical area over which the Message Code is unique,
-   * and the display mode.
-   *
-   * Possible values are: "cell-immediate", "plmn", "location-area" and "cell".
-   */
-  readonly attribute CellBroadcastGsmGeographicalScope? gsmGeographicalScope;
-
-  /**
-   * The Message Code differentiates between messages from the same source and
-   * type (e.g., with the same Message Identifier).
-   */
-  readonly attribute unsigned short messageCode;
-
-  /**
-   * Source and type of the message. For example, "Automotive Association"
-   * (= source), "Traffic Reports" (= type) could correspond to one value. The
-   * Message Identifier is coded in binary.
-   */
-  readonly attribute unsigned short messageId;
-
-  /**
-   * ISO-639-1 language code for this message. Null if unspecified.
-   */
-  readonly attribute DOMString? language;
-
-  /**
-   * Text message carried by the message.
-   */
-  readonly attribute DOMString? body;
-
-  /**
-   * Possible values are "normal", "class-0", "class-1", "class-2", "class-3",
-   * "user-1", and "user-2".
-   */
-  readonly attribute CellBroadcastMessageClass? messageClass;
-
-  /**
-   * System time stamp at receival.
-   */
-  readonly attribute DOMTimeStamp timestamp;
-
-  /**
-   * Additional ETWS-specific info.
-   */
-  readonly attribute MozCellBroadcastEtwsInfo? etws;
-
-  /**
-   * Service Category.
-   */
-  readonly attribute unsigned short? cdmaServiceCategory;
-};
-
-[Pref="dom.cellbroadcast.enabled",
- ChromeOnly]
-interface MozCellBroadcastEtwsInfo
-{
-  /**
-   * Warning type. Possible values are "earthquake", "tsunami",
-   * "earthquake-tsunami", "test" and "other".
-   */
-  readonly attribute CellBroadcastEtwsWarningType? warningType;
-
-  /**
-   * Emergency user alert indication. It is used to command mobile terminals to
-   * activate emergency user alert upon the reception of ETWS primary
-   * notification.
-   */
-  readonly attribute boolean emergencyUserAlert;
-
-  /**
-   * Message popup indication. It is used to command mobile terminals to
-   * activate message popup upon the reception of ETWS primary notification.
-   */
-  readonly attribute boolean popup;
-};
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -278,22 +278,16 @@ partial interface Navigator {
 
 #ifdef MOZ_B2G_RIL
 partial interface Navigator {
   [Throws, Pref="dom.mobileconnection.enabled", ChromeOnly, UnsafeInPrerendering]
   readonly attribute MozMobileConnectionArray mozMobileConnections;
 };
 
 partial interface Navigator {
-  [Throws, Pref="dom.cellbroadcast.enabled", ChromeOnly,
-   UnsafeInPrerendering]
-  readonly attribute MozCellBroadcast mozCellBroadcast;
-};
-
-partial interface Navigator {
   [Throws, Pref="dom.voicemail.enabled", ChromeOnly,
    UnsafeInPrerendering]
   readonly attribute MozVoicemail mozVoicemail;
 };
 
 partial interface Navigator {
   [Throws, Pref="dom.icc.enabled", ChromeOnly,
    UnsafeInPrerendering]
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -329,18 +329,16 @@ WEBIDL_FILES = [
     'MessagePortList.webidl',
     'MimeType.webidl',
     'MimeTypeArray.webidl',
     'MMICall.webidl',
     'MmsMessage.webidl',
     'MobileMessageThread.webidl',
     'MouseEvent.webidl',
     'MouseScrollEvent.webidl',
-    'MozCellBroadcast.webidl',
-    'MozCellBroadcastMessage.webidl',
     'MozIcc.webidl',
     'MozIccInfo.webidl',
     'MozIccManager.webidl',
     'MozMobileCellInfo.webidl',
     'MozMobileConnection.webidl',
     'MozMobileConnectionArray.webidl',
     'MozMobileConnectionInfo.webidl',
     'MozMobileMessageManager.webidl',
@@ -798,17 +796,16 @@ GENERATED_EVENTS_WEBIDL_FILES = [
     'ErrorEvent.webidl',
     'FontFaceSetLoadEvent.webidl',
     'HashChangeEvent.webidl',
     'HiddenPluginEvent.webidl',
     'IccChangeEvent.webidl',
     'ImageCaptureErrorEvent.webidl',
     'MediaStreamEvent.webidl',
     'MediaStreamTrackEvent.webidl',
-    'MozCellBroadcastEvent.webidl',
     'MozClirModeEvent.webidl',
     'MozContactChangeEvent.webidl',
     'MozEmergencyCbModeEvent.webidl',
     'MozMessageDeletedEvent.webidl',
     'MozMmsEvent.webidl',
     'MozOtaStatusEvent.webidl',
     'MozSettingsEvent.webidl',
     'MozSettingsTransactionEvent.webidl',
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -192,17 +192,16 @@ NS_NewXULTreeBuilder(nsISupports* aOuter
 
 static void Shutdown();
 
 #include "nsGeolocation.h"
 #include "nsDeviceSensors.h"
 #include "mozilla/dom/nsContentSecurityManager.h"
 #include "mozilla/dom/nsCSPService.h"
 #include "mozilla/dom/nsCSPContext.h"
-#include "nsICellBroadcastService.h"
 #include "nsIIccService.h"
 #include "nsISmsService.h"
 #include "nsIMmsService.h"
 #include "nsIMobileConnectionService.h"
 #include "nsIMobileMessageService.h"
 #include "nsIMobileMessageDatabaseService.h"
 #include "nsIPowerManagerService.h"
 #include "nsIMediaManager.h"
@@ -342,18 +341,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChan
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors)
 
 #ifndef MOZ_WIDGET_GONK
 #if defined(ANDROID)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback)
 #endif
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init)
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsICellBroadcastService,
-                                         NS_CreateCellBroadcastService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISmsService, NS_CreateSmsService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIIccService, NS_CreateIccService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMmsService, NS_CreateMmsService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMobileMessageService,
                                          NS_CreateMobileMessageService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMobileMessageDatabaseService,
                                          NS_CreateMobileMessageDatabaseService)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
@@ -812,17 +809,16 @@ NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CI
 NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID);
 #endif
 #endif
 #ifndef DISABLE_MOZ_RIL_GEOLOC
 #ifdef MOZ_WIDGET_GONK
 NS_DEFINE_NAMED_CID(GONK_GPS_GEOLOCATION_PROVIDER_CID);
 #endif
 #endif
-NS_DEFINE_NAMED_CID(CELLBROADCAST_SERVICE_CID);
 NS_DEFINE_NAMED_CID(TELEPHONY_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_VOICEMAIL_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_MOBILE_CONNECTION_SERVICE_CID);
 NS_DEFINE_NAMED_CID(SMS_SERVICE_CID);
 NS_DEFINE_NAMED_CID(ICC_SERVICE_CID);
 NS_DEFINE_NAMED_CID(MMS_SERVICE_CID);
 NS_DEFINE_NAMED_CID(MOBILE_MESSAGE_SERVICE_CID);
 NS_DEFINE_NAMED_CID(MOBILE_MESSAGE_DATABASE_SERVICE_CID);
@@ -1116,17 +1112,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_DEVICE_SENSORS_CID, false, nullptr, nsDeviceSensorsConstructor },
 #ifndef MOZ_WIDGET_GONK
 #if defined(ANDROID)
   { &kNS_HAPTICFEEDBACK_CID, false, nullptr, nsHapticFeedbackConstructor },
 #endif
 #endif
   { &kTHIRDPARTYUTIL_CID, false, nullptr, ThirdPartyUtilConstructor },
   { &kNS_STRUCTUREDCLONECONTAINER_CID, false, nullptr, nsStructuredCloneContainerConstructor },
-  { &kCELLBROADCAST_SERVICE_CID, false, nullptr, nsICellBroadcastServiceConstructor },
   { &kSMS_SERVICE_CID, false, nullptr, nsISmsServiceConstructor },
   { &kICC_SERVICE_CID, false, nullptr, nsIIccServiceConstructor },
   { &kMMS_SERVICE_CID, false, nullptr, nsIMmsServiceConstructor },
   { &kMOBILE_MESSAGE_SERVICE_CID, false, nullptr, nsIMobileMessageServiceConstructor },
   { &kMOBILE_MESSAGE_DATABASE_SERVICE_CID, false, nullptr, nsIMobileMessageDatabaseServiceConstructor },
   { &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS },
   { &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor },
   { &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor },
@@ -1279,17 +1274,16 @@ static const mozilla::Module::ContractID
   { NS_DEVICE_SENSORS_CONTRACTID, &kNS_DEVICE_SENSORS_CID },
 #ifndef MOZ_WIDGET_GONK
 #if defined(ANDROID)
   { "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID },
 #endif
 #endif
   { THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID },
   { NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID },
-  { CELLBROADCAST_SERVICE_CONTRACTID, &kCELLBROADCAST_SERVICE_CID },
   { SMS_SERVICE_CONTRACTID, &kSMS_SERVICE_CID },
   { ICC_SERVICE_CONTRACTID, &kICC_SERVICE_CID },
   { MMS_SERVICE_CONTRACTID, &kMMS_SERVICE_CID },
   { MOBILE_MESSAGE_SERVICE_CONTRACTID, &kMOBILE_MESSAGE_SERVICE_CID },
   { MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID, &kMOBILE_MESSAGE_DATABASE_SERVICE_CID },
   { POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID, Module::ALLOW_IN_GPU_PROCESS },
   { OSFILECONSTANTSSERVICE_CONTRACTID, &kOSFILECONSTANTSSERVICE_CID },
   { "@mozilla.org/udp-socket-child;1", &kUDPSOCKETCHILD_CID },
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5057,23 +5057,16 @@ pref("dom.flyweb.enabled", false);
 pref("dom.telephony.enabled", true);
 #else
 pref("dom.telephony.enabled", false);
 #endif
 // Numeric default service id for WebTelephony API calls with |serviceId|
 // parameter omitted.
 pref("dom.telephony.defaultServiceId", 0);
 
-// Cell Broadcast API
-#ifdef MOZ_B2G_RIL
-pref("dom.cellbroadcast.enabled", true);
-#else
-pref("dom.cellbroadcast.enabled", false);
-#endif
-
 // ICC API
 #ifdef MOZ_B2G_RIL
 pref("dom.icc.enabled", true);
 #else
 pref("dom.icc.enabled", false);
 #endif
 
 // Mobile Connection API
--- a/testing/marionette/harness/marionette/tests/webapi-tests.ini
+++ b/testing/marionette/harness/marionette/tests/webapi-tests.ini
@@ -6,12 +6,11 @@
 [include:../../../../../dom/mobileconnection/tests/marionette/manifest.ini]
 [include:../../../../../dom/system/gonk/tests/marionette/manifest.ini]
 [include:../../../../../dom/icc/tests/marionette/manifest.ini]
 [include:../../../../../dom/system/tests/marionette/manifest.ini]
 [include:../../../../../dom/nfc/tests/marionette/manifest.ini]
 skip-if = android_version > '15' # Bug 1203072
 [include:../../../../../dom/events/test/marionette/manifest.ini]
 [include:../../../../../dom/wifi/test/marionette/manifest.ini]
-[include:../../../../../dom/cellbroadcast/tests/marionette/manifest.ini]
 [include:../../../../../dom/tethering/tests/marionette/manifest.ini]
 skip-if = android_version > '15' # Bug 1203075
 [include:../../../../../dom/network/tests/marionette/manifest.ini]