Backed out changeset fab00bedff2d (bug 1072808)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Nov 2014 10:45:40 +0100
changeset 233586 a1b0871d0014fc86d030865d2a57480a7bea4954
parent 233585 f967b360479a4f58ca646c768ea99fae8cb4929e
child 233587 c88725975388342bb6df66a0a8c68dccbd837d4b
push id7326
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:58:42 +0000
treeherdermozilla-aurora@d3a3b2a0f2f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1072808
milestone36.0a1
backs outfab00bedff2d03434ff55d1a20c29b31851235cf
Backed out changeset fab00bedff2d (bug 1072808)
dom/cellbroadcast/CellBroadcastMessage.cpp
dom/cellbroadcast/gonk/CellBroadcastService.js
dom/cellbroadcast/interfaces/moz.build
dom/cellbroadcast/interfaces/nsICellBroadcastService.idl
dom/cellbroadcast/interfaces/nsICellbroadcastMessenger.idl
dom/system/gonk/RILSystemMessenger.jsm
dom/system/gonk/RILSystemMessengerHelper.js
dom/system/gonk/RadioInterfaceLayer.js
dom/system/gonk/tests/test_ril_system_messenger.js
--- a/dom/cellbroadcast/CellBroadcastMessage.cpp
+++ b/dom/cellbroadcast/CellBroadcastMessage.cpp
@@ -78,24 +78,22 @@ CellBroadcastMessage::CellBroadcastMessa
   , mBody(aBody)
   , mTimestamp(aTimestamp)
   , mEtwsInfo(aHasEtwsInfo ? new CellBroadcastEtwsInfo(aWindow,
                                                        aEtwsWarningType,
                                                        aEtwsEmergencyUserAlert,
                                                        aEtwsPopup)
                            : nullptr)
 {
-  if (aGsmGeographicalScope <
-      static_cast<uint32_t>(CellBroadcastGsmGeographicalScope::EndGuard_)) {
+  if (aGsmGeographicalScope < nsICellBroadcastService::GSM_GEOGRAPHICAL_SCOPE_INVALID) {
     mGsmGeographicalScope.SetValue(
       ToWebidlEnum<CellBroadcastGsmGeographicalScope>(aGsmGeographicalScope));
   }
 
-  if (aMessageClass <
-      static_cast<uint32_t>(CellBroadcastMessageClass::EndGuard_)) {
+  if (aMessageClass < nsICellBroadcastService::GSM_MESSAGE_CLASS_INVALID) {
     mMessageClass.SetValue(
       ToWebidlEnum<CellBroadcastMessageClass>(aMessageClass));
   }
 
   // CdmaServiceCategory represents a 16bit unsigned value.
   if (aCdmaServiceCategory <= 0xFFFFU) {
     mCdmaServiceCategory.SetValue(static_cast<uint16_t>(aCdmaServiceCategory));
   }
@@ -131,18 +129,17 @@ NS_INTERFACE_MAP_END
 CellBroadcastEtwsInfo::CellBroadcastEtwsInfo(nsPIDOMWindow* aWindow,
                                              uint32_t aWarningType,
                                              bool aEmergencyUserAlert,
                                              bool aPopup)
   : mWindow(aWindow)
   , mEmergencyUserAlert(aEmergencyUserAlert)
   , mPopup(aPopup)
 {
-  if (aWarningType <
-      static_cast<uint32_t>(CellBroadcastEtwsWarningType::EndGuard_)) {
+  if (aWarningType < nsICellBroadcastService::GSM_ETWS_WARNING_INVALID) {
     mWarningType.SetValue(
       ToWebidlEnum<CellBroadcastEtwsWarningType>(aWarningType));
   }
 }
 
 JSObject*
 CellBroadcastEtwsInfo::WrapObject(JSContext* aCx)
 {
--- a/dom/cellbroadcast/gonk/CellBroadcastService.js
+++ b/dom/cellbroadcast/gonk/CellBroadcastService.js
@@ -15,19 +15,19 @@ XPCOMUtils.defineLazyGetter(this, "RIL",
   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, "gSystemMessenger",
+                                   "@mozilla.org/system-message-internal;1",
+                                   "nsISystemMessagesInternal");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService",
                                    "@mozilla.org/settingsService;1",
                                    "nsISettingsService");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gRadioInterfaceLayer",
                                    "@mozilla.org/ril;1",
                                    "nsIRadioInterfaceLayer");
@@ -107,16 +107,34 @@ CellBroadcastService.prototype = {
 
   _updateDebugFlag: function() {
     try {
       DEBUG = RIL.DEBUG_RIL ||
               Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
     } catch (e) {}
   },
 
+  _convertCbGsmGeographicalScope: function(aGeographicalScope) {
+    return (aGeographicalScope >= Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_INVALID)
+      ? null
+      : RIL.CB_GSM_GEOGRAPHICAL_SCOPE_NAMES[aGeographicalScope];
+  },
+
+  _convertCbMessageClass: function(aMessageClass) {
+    return (aMessageClass >= Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS)
+      ? null
+      : RIL.GECKO_SMS_MESSAGE_CLASSES[aMessageClass];
+  },
+
+  _convertCbEtwsWarningType: function(aWarningType) {
+    return (aWarningType >= Ci.nsICellBroadcastService.GSM_ETWS_WARNING_INVALID)
+      ? null
+      : RIL.CB_ETWS_WARNING_TYPE_NAMES[aWarningType];
+  },
+
   _retrieveSettingValueByClient: function(aClientId, aSettings) {
     return Array.isArray(aSettings) ? aSettings[aClientId] : aSettings;
   },
 
   /**
    * Helper function to set CellBroadcastDisabled to each RadioInterface.
    */
   setCellBroadcastDisabled: function(aSettings) {
@@ -213,29 +231,48 @@ CellBroadcastService.prototype = {
                                   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);
+    // Align the same layout to MozCellBroadcastMessage
+    let systemMessage = {
+      serviceId: aServiceId,
+      gsmGeographicalScope: this._convertCbGsmGeographicalScope(aGsmGeographicalScope),
+      messageCode: aMessageCode,
+      messageId: aMessageId,
+      language: aLanguage,
+      body: aBody,
+      messageClass: this._convertCbMessageClass(aMessageClass),
+      timestamp: aTimestamp,
+      cdmaServiceCategory: null,
+      etws: null
+    };
+
+    if (aHasEtwsInfo) {
+      systemMessage.etws = {
+        warningType: this._convertCbEtwsWarningType(aEtwsWarningType),
+        emergencyUserAlert: aEtwsEmergencyUserAlert,
+        popup: aEtwsPopup
+      };
+    }
+
+    if (aCdmaServiceCategory !=
+        Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID) {
+      systemMessage.cdmaServiceCategory = aCdmaServiceCategory;
+    }
+
+    if (DEBUG) {
+      debug("CBS system message to be broadcasted: " + JSON.stringify(systemMessage));
+    }
+
+    gSystemMessenger.broadcastMessage("cellbroadcast-received", systemMessage);
 
     // Notify received message to registered listener
     for (let listener of this._listeners) {
       try {
         listener.notifyMessageReceived(aServiceId,
                                        aGsmGeographicalScope,
                                        aMessageCode,
                                        aMessageId,
--- a/dom/cellbroadcast/interfaces/moz.build
+++ b/dom/cellbroadcast/interfaces/moz.build
@@ -5,13 +5,12 @@
 # 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'
--- a/dom/cellbroadcast/interfaces/nsICellBroadcastService.idl
+++ b/dom/cellbroadcast/interfaces/nsICellBroadcastService.idl
@@ -31,53 +31,52 @@ interface nsICellBroadcastListener : nsI
   { 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)]
+[scriptable, uuid(eed283f6-44a8-11e4-b364-afb894b7a283)]
 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;
+  const unsigned short GSM_GEOGRAPHICAL_SCOPE_INVALID        = 4;
 
   /**
    * 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;
+  const unsigned short GSM_MESSAGE_CLASS_INVALID = 7;
 
   /**
    * 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;
+  const unsigned short GSM_ETWS_WARNING_INVALID            = 5;
 
   /**
    * 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;
 
   /**
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);
-};
--- a/dom/system/gonk/RILSystemMessenger.jsm
+++ b/dom/system/gonk/RILSystemMessenger.jsm
@@ -101,63 +101,14 @@ RILSystemMessenger.prototype = {
       receiver:          aReceiver,
       body:              aBody,
       messageClass:      this._convertSmsMessageClass(aMessageClass),
       timestamp:         aTimestamp,
       sentTimestamp:     aSentTimestamp,
       deliveryTimestamp: aDeliveryTimestamp,
       read:              aRead
     });
-  },
-
-  _convertCbGsmGeographicalScope: function(aGeographicalScope) {
-    return RIL.CB_GSM_GEOGRAPHICAL_SCOPE_NAMES[aGeographicalScope] || null;
-  },
-
-  _convertCbMessageClass: function(aMessageClass) {
-    return RIL.GECKO_SMS_MESSAGE_CLASSES[aMessageClass] || null;
-  },
-
-  _convertCbEtwsWarningType: function(aWarningType) {
-    return RIL.CB_ETWS_WARNING_TYPE_NAMES[aWarningType] || null;
-  },
-
-  /**
-   * Wrapper to send 'cellbroadcast-received' system message.
-   */
-  notifyCbMessageReceived: function(aServiceId, aGsmGeographicalScope, aMessageCode,
-                                    aMessageId, aLanguage, aBody, aMessageClass,
-                                    aTimestamp, aCdmaServiceCategory, aHasEtwsInfo,
-                                    aEtwsWarningType, aEtwsEmergencyUserAlert, aEtwsPopup) {
-    // Align the same layout to MozCellBroadcastMessage
-    let data = {
-      serviceId: aServiceId,
-      gsmGeographicalScope: this._convertCbGsmGeographicalScope(aGsmGeographicalScope),
-      messageCode: aMessageCode,
-      messageId: aMessageId,
-      language: aLanguage,
-      body: aBody,
-      messageClass: this._convertCbMessageClass(aMessageClass),
-      timestamp: aTimestamp,
-      cdmaServiceCategory: null,
-      etws: null
-    };
-
-    if (aHasEtwsInfo) {
-      data.etws = {
-        warningType: this._convertCbEtwsWarningType(aEtwsWarningType),
-        emergencyUserAlert: aEtwsEmergencyUserAlert,
-        popup: aEtwsPopup
-      };
-    }
-
-    if (aCdmaServiceCategory !=
-        Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID) {
-      data.cdmaServiceCategory = aCdmaServiceCategory;
-    }
-
-    this.broadcastMessage("cellbroadcast-received", data);
   }
 };
 
 this.EXPORTED_SYMBOLS = [
   'RILSystemMessenger'
 ];
--- a/dom/system/gonk/RILSystemMessengerHelper.js
+++ b/dom/system/gonk/RILSystemMessengerHelper.js
@@ -45,18 +45,17 @@ function RILSystemMessengerHelper() {
 
     gSystemMessenger.broadcastMessage(aType, aMessage);
   };
 }
 RILSystemMessengerHelper.prototype = {
 
   classID: RILSYSTEMMESSENGERHELPER_CID,
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyMessenger,
-                                         Ci.nsISmsMessenger,
-                                         Ci.nsICellbroadcastMessenger]),
+                                         Ci.nsISmsMessenger]),
 
   /**
    * RILSystemMessenger instance.
    */
   messenger: null,
 
   /**
    * nsITelephonyMessenger API
@@ -75,25 +74,12 @@ RILSystemMessengerHelper.prototype = {
    * nsISmsMessenger API
    */
   notifySms: function(aNotificationType, aId, aThreadId, aIccId, aDelivery,
                       aDeliveryStatus, aSender, aReceiver, aBody, aMessageClass,
                       aTimestamp, aSentTimestamp, aDeliveryTimestamp, aRead) {
     this.messenger.notifySms(aNotificationType, aId, aThreadId, aIccId, aDelivery,
                              aDeliveryStatus, aSender, aReceiver, aBody, aMessageClass,
                              aTimestamp, aSentTimestamp, aDeliveryTimestamp, aRead);
-  },
-
-  /**
-   * nsICellbroadcastMessenger API
-   */
-  notifyCbMessageReceived: function(aServiceId, aGsmGeographicalScope, aMessageCode,
-                                    aMessageId, aLanguage, aBody, aMessageClass,
-                                    aTimestamp, aCdmaServiceCategory, aHasEtwsInfo,
-                                    aEtwsWarningType, aEtwsEmergencyUserAlert, aEtwsPopup) {
-    this.messenger.notifyCbMessageReceived(aServiceId, aGsmGeographicalScope, aMessageCode,
-                                           aMessageId, aLanguage, aBody, aMessageClass,
-                                           aTimestamp, aCdmaServiceCategory, aHasEtwsInfo,
-                                           aEtwsWarningType, aEtwsEmergencyUserAlert, aEtwsPopup);
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RILSystemMessengerHelper]);
\ No newline at end of file
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -2822,17 +2822,17 @@ RadioInterface.prototype = {
       ? aGeographicalScope
       : Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_INVALID;
   },
 
   _convertCbMessageClass: function(aMessageClass) {
     let index = RIL.GECKO_SMS_MESSAGE_CLASSES.indexOf(aMessageClass);
     return (index != -1)
       ? index
-      : Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_NORMAL;
+      : Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_INVALID;
   },
 
   _convertCbEtwsWarningType: function(aWarningType) {
     return (aWarningType != null)
       ? aWarningType
       : Ci.nsICellBroadcastService.GSM_ETWS_WARNING_INVALID;
   },
 
--- a/dom/system/gonk/tests/test_ril_system_messenger.js
+++ b/dom/system/gonk/tests/test_ril_system_messenger.js
@@ -46,22 +46,18 @@ function equal_received_system_message(a
  */
 function run_test() {
   let telephonyMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
                            .getService(Ci.nsITelephonyMessenger);
 
   let smsMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
                      .getService(Ci.nsISmsMessenger);
 
-  let cellbroadcastMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
-                               .getService(Ci.nsICellbroadcastMessenger);
-
   ok(telephonyMessenger !== null, "Get TelephonyMessenger.");
   ok(smsMessenger != null, "Get SmsMessenger.");
-  ok(cellbroadcastMessenger != null, "Get CellbroadcastMessenger.");
 
   run_next_test();
 }
 
 /**
  * Verify RILSystemMessenger.notifyNewCall()
  */
 add_test(function test_telephony_messenger_notify_new_call() {
@@ -242,134 +238,8 @@ add_test(function test_sms_messenger_not
                         sentTimestamp,
                         0,
                         false);
     ok(false, "Failed to verify the protection of invalid nsISmsMessenger.NOTIFICATION_TYPE!");
   } catch (e) {}
 
   run_next_test();
 });
-
-/**
- * Verify RILSystemMessenger.notifyCbMessageReceived()
- */
-add_test(function test_cellbroadcast_messenger_notify_cb_message_received() {
-  let messenger = newRILSystemMessenger();
-  let timestamp = Date.now();
-
-  // Verify ETWS
-  messenger.notifyCbMessageReceived(0,
-                                    Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_CELL_IMMEDIATE,
-                                    256,
-                                    4352,
-                                    null,
-                                    null,
-                                    Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_NORMAL,
-                                    timestamp,
-                                    Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID,
-                                    true,
-                                    Ci.nsICellBroadcastService.GSM_ETWS_WARNING_EARTHQUAKE,
-                                    false,
-                                    true);
-  equal_received_system_message("cellbroadcast-received", {
-      serviceId: 0,
-      gsmGeographicalScope: "cell-immediate",
-      messageCode: 256,
-      messageId: 4352,
-      language: null,
-      body: null,
-      messageClass: "normal",
-      timestamp: timestamp,
-      cdmaServiceCategory: null,
-      etws: {
-        warningType: "earthquake",
-        emergencyUserAlert: false,
-        popup: true
-      }
-  });
-
-  // Verify Normal CB Message
-  messenger.notifyCbMessageReceived(1,
-                                    Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_PLMN,
-                                    0,
-                                    50,
-                                    "en",
-                                    "The quick brown fox jumps over the lazy dog",
-                                    Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_NORMAL,
-                                    timestamp,
-                                    Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID,
-                                    false,
-                                    Ci.nsICellBroadcastService.GSM_ETWS_WARNING_INVALID,
-                                    false,
-                                    false);
-  equal_received_system_message("cellbroadcast-received", {
-      serviceId: 1,
-      gsmGeographicalScope: "plmn",
-      messageCode: 0,
-      messageId: 50,
-      language: "en",
-      body: "The quick brown fox jumps over the lazy dog",
-      messageClass: "normal",
-      timestamp: timestamp,
-      cdmaServiceCategory: null,
-      etws: null
-  });
-
-  // Verify CB Message with ETWS Info
-  messenger.notifyCbMessageReceived(0,
-                                    Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_LOCATION_AREA,
-                                    0,
-                                    4354,
-                                    "en",
-                                    "Earthquake & Tsunami Warning!",
-                                    Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_0,
-                                    timestamp,
-                                    Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID,
-                                    true,
-                                    Ci.nsICellBroadcastService.GSM_ETWS_WARNING_EARTHQUAKE_TSUNAMI,
-                                    true,
-                                    false);
-  equal_received_system_message("cellbroadcast-received", {
-      serviceId: 0,
-      gsmGeographicalScope: "location-area",
-      messageCode: 0,
-      messageId: 4354,
-      language: "en",
-      body: "Earthquake & Tsunami Warning!",
-      messageClass: "class-0",
-      timestamp: timestamp,
-      cdmaServiceCategory: null,
-      etws: {
-        warningType: "earthquake-tsunami",
-        emergencyUserAlert: true,
-        popup: false
-      }
-  });
-
-  // Verify CDMA CB Message
-  messenger.notifyCbMessageReceived(0,
-                                    Ci.nsICellBroadcastService.GSM_GEOGRAPHICAL_SCOPE_INVALID,
-                                    0,
-                                    0,
-                                    null,
-                                    "CDMA CB Message",
-                                    Ci.nsICellBroadcastService.GSM_MESSAGE_CLASS_NORMAL,
-                                    timestamp,
-                                    512,
-                                    false,
-                                    Ci.nsICellBroadcastService.GSM_ETWS_WARNING_INVALID,
-                                    false,
-                                    false);
-  equal_received_system_message("cellbroadcast-received", {
-      serviceId: 0,
-      gsmGeographicalScope: null,
-      messageCode: 0,
-      messageId: 0,
-      language: null,
-      body: "CDMA CB Message",
-      messageClass: "normal",
-      timestamp: timestamp,
-      cdmaServiceCategory: 512,
-      etws: null
-  });
-
-  run_next_test();
-});