Bug 1213547 - [Cellbroadcast] Split test_ril_worker_cellbroadcast.js into smaller tests. r=btseng
authorEdgar Chen <echen@mozilla.com>
Sat, 10 Oct 2015 12:05:38 +0800
changeset 267417 137777f64b8cc2076592c94a2007c14e016bcecd
parent 267416 97f0337e96236f987380c791a9332f3790415329
child 267418 b2f57376ca0aa750c43e137b6923953b52563f6b
push id29519
push usercbook@mozilla.com
push dateWed, 14 Oct 2015 10:29:57 +0000
treeherdermozilla-central@6307530f9f1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbtseng
bugs1213547
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1213547 - [Cellbroadcast] Split test_ril_worker_cellbroadcast.js into smaller tests. r=btseng
dom/system/gonk/tests/test_ril_worker_cellbroadcast.js
dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
dom/system/gonk/tests/test_ril_worker_cellbroadcast_gsm.js
dom/system/gonk/tests/test_ril_worker_cellbroadcast_umts.js
dom/system/gonk/tests/xpcshell.ini
--- a/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
+++ b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ -166,8 +166,248 @@ add_test(function test_ril_worker_cellbr
   test(true, searchListStr, "1,2,2,3,3,4,4,5");
   test(false, searchList, "1,2,2,3,3,4,4,5");
   test(true, searchList, "5,6,6,7,7,8,8,9");
   test(false, null, "null");
   test(true, null, "null");
 
   run_next_test();
 });
+
+add_test(function test_ril_worker_mergeCellBroadcastConfigs() {
+  let worker = newWorker({
+    postRILMessage: function(data) {
+      // Do nothing
+    },
+    postMessage: function(message) {
+      // Do nothing
+    }
+  });
+
+  let context = worker.ContextPool._contexts[0];
+  let ril = context.RIL;
+
+  function test(olist, from, to, expected) {
+    let result = ril._mergeCellBroadcastConfigs(olist, from, to);
+    equal(JSON.stringify(expected), JSON.stringify(result));
+  }
+
+  test(null, 0, 1, [0, 1]);
+
+  test([10, 13],  7,  8, [ 7,  8, 10, 13]);
+  test([10, 13],  7,  9, [ 7,  9, 10, 13]);
+  test([10, 13],  7, 10, [ 7, 13]);
+  test([10, 13],  7, 11, [ 7, 13]);
+  test([10, 13],  7, 12, [ 7, 13]);
+  test([10, 13],  7, 13, [ 7, 13]);
+  test([10, 13],  7, 14, [ 7, 14]);
+  test([10, 13],  7, 15, [ 7, 15]);
+  test([10, 13],  7, 16, [ 7, 16]);
+  test([10, 13],  8,  9, [ 8,  9, 10, 13]);
+  test([10, 13],  8, 10, [ 8, 13]);
+  test([10, 13],  8, 11, [ 8, 13]);
+  test([10, 13],  8, 12, [ 8, 13]);
+  test([10, 13],  8, 13, [ 8, 13]);
+  test([10, 13],  8, 14, [ 8, 14]);
+  test([10, 13],  8, 15, [ 8, 15]);
+  test([10, 13],  8, 16, [ 8, 16]);
+  test([10, 13],  9, 10, [ 9, 13]);
+  test([10, 13],  9, 11, [ 9, 13]);
+  test([10, 13],  9, 12, [ 9, 13]);
+  test([10, 13],  9, 13, [ 9, 13]);
+  test([10, 13],  9, 14, [ 9, 14]);
+  test([10, 13],  9, 15, [ 9, 15]);
+  test([10, 13],  9, 16, [ 9, 16]);
+  test([10, 13], 10, 11, [10, 13]);
+  test([10, 13], 10, 12, [10, 13]);
+  test([10, 13], 10, 13, [10, 13]);
+  test([10, 13], 10, 14, [10, 14]);
+  test([10, 13], 10, 15, [10, 15]);
+  test([10, 13], 10, 16, [10, 16]);
+  test([10, 13], 11, 12, [10, 13]);
+  test([10, 13], 11, 13, [10, 13]);
+  test([10, 13], 11, 14, [10, 14]);
+  test([10, 13], 11, 15, [10, 15]);
+  test([10, 13], 11, 16, [10, 16]);
+  test([10, 13], 12, 13, [10, 13]);
+  test([10, 13], 12, 14, [10, 14]);
+  test([10, 13], 12, 15, [10, 15]);
+  test([10, 13], 12, 16, [10, 16]);
+  test([10, 13], 13, 14, [10, 14]);
+  test([10, 13], 13, 15, [10, 15]);
+  test([10, 13], 13, 16, [10, 16]);
+  test([10, 13], 14, 15, [10, 13, 14, 15]);
+  test([10, 13], 14, 16, [10, 13, 14, 16]);
+  test([10, 13], 15, 16, [10, 13, 15, 16]);
+
+  test([10, 13, 14, 17],  7,  8, [ 7,  8, 10, 13, 14, 17]);
+  test([10, 13, 14, 17],  7,  9, [ 7,  9, 10, 13, 14, 17]);
+  test([10, 13, 14, 17],  7, 10, [ 7, 13, 14, 17]);
+  test([10, 13, 14, 17],  7, 11, [ 7, 13, 14, 17]);
+  test([10, 13, 14, 17],  7, 12, [ 7, 13, 14, 17]);
+  test([10, 13, 14, 17],  7, 13, [ 7, 13, 14, 17]);
+  test([10, 13, 14, 17],  7, 14, [ 7, 17]);
+  test([10, 13, 14, 17],  7, 15, [ 7, 17]);
+  test([10, 13, 14, 17],  7, 16, [ 7, 17]);
+  test([10, 13, 14, 17],  7, 17, [ 7, 17]);
+  test([10, 13, 14, 17],  7, 18, [ 7, 18]);
+  test([10, 13, 14, 17],  7, 19, [ 7, 19]);
+  test([10, 13, 14, 17],  8,  9, [ 8,  9, 10, 13, 14, 17]);
+  test([10, 13, 14, 17],  8, 10, [ 8, 13, 14, 17]);
+  test([10, 13, 14, 17],  8, 11, [ 8, 13, 14, 17]);
+  test([10, 13, 14, 17],  8, 12, [ 8, 13, 14, 17]);
+  test([10, 13, 14, 17],  8, 13, [ 8, 13, 14, 17]);
+  test([10, 13, 14, 17],  8, 14, [ 8, 17]);
+  test([10, 13, 14, 17],  8, 15, [ 8, 17]);
+  test([10, 13, 14, 17],  8, 16, [ 8, 17]);
+  test([10, 13, 14, 17],  8, 17, [ 8, 17]);
+  test([10, 13, 14, 17],  8, 18, [ 8, 18]);
+  test([10, 13, 14, 17],  8, 19, [ 8, 19]);
+  test([10, 13, 14, 17],  9, 10, [ 9, 13, 14, 17]);
+  test([10, 13, 14, 17],  9, 11, [ 9, 13, 14, 17]);
+  test([10, 13, 14, 17],  9, 12, [ 9, 13, 14, 17]);
+  test([10, 13, 14, 17],  9, 13, [ 9, 13, 14, 17]);
+  test([10, 13, 14, 17],  9, 14, [ 9, 17]);
+  test([10, 13, 14, 17],  9, 15, [ 9, 17]);
+  test([10, 13, 14, 17],  9, 16, [ 9, 17]);
+  test([10, 13, 14, 17],  9, 17, [ 9, 17]);
+  test([10, 13, 14, 17],  9, 18, [ 9, 18]);
+  test([10, 13, 14, 17],  9, 19, [ 9, 19]);
+  test([10, 13, 14, 17], 10, 11, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 10, 12, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 10, 13, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 10, 14, [10, 17]);
+  test([10, 13, 14, 17], 10, 15, [10, 17]);
+  test([10, 13, 14, 17], 10, 16, [10, 17]);
+  test([10, 13, 14, 17], 10, 17, [10, 17]);
+  test([10, 13, 14, 17], 10, 18, [10, 18]);
+  test([10, 13, 14, 17], 10, 19, [10, 19]);
+  test([10, 13, 14, 17], 11, 12, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 11, 13, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 11, 14, [10, 17]);
+  test([10, 13, 14, 17], 11, 15, [10, 17]);
+  test([10, 13, 14, 17], 11, 16, [10, 17]);
+  test([10, 13, 14, 17], 11, 17, [10, 17]);
+  test([10, 13, 14, 17], 11, 18, [10, 18]);
+  test([10, 13, 14, 17], 11, 19, [10, 19]);
+  test([10, 13, 14, 17], 12, 13, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 12, 14, [10, 17]);
+  test([10, 13, 14, 17], 12, 15, [10, 17]);
+  test([10, 13, 14, 17], 12, 16, [10, 17]);
+  test([10, 13, 14, 17], 12, 17, [10, 17]);
+  test([10, 13, 14, 17], 12, 18, [10, 18]);
+  test([10, 13, 14, 17], 12, 19, [10, 19]);
+  test([10, 13, 14, 17], 13, 14, [10, 17]);
+  test([10, 13, 14, 17], 13, 15, [10, 17]);
+  test([10, 13, 14, 17], 13, 16, [10, 17]);
+  test([10, 13, 14, 17], 13, 17, [10, 17]);
+  test([10, 13, 14, 17], 13, 18, [10, 18]);
+  test([10, 13, 14, 17], 13, 19, [10, 19]);
+  test([10, 13, 14, 17], 14, 15, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 14, 16, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 14, 17, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 14, 18, [10, 13, 14, 18]);
+  test([10, 13, 14, 17], 14, 19, [10, 13, 14, 19]);
+  test([10, 13, 14, 17], 15, 16, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 15, 17, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 15, 18, [10, 13, 14, 18]);
+  test([10, 13, 14, 17], 15, 19, [10, 13, 14, 19]);
+  test([10, 13, 14, 17], 16, 17, [10, 13, 14, 17]);
+  test([10, 13, 14, 17], 16, 18, [10, 13, 14, 18]);
+  test([10, 13, 14, 17], 16, 19, [10, 13, 14, 19]);
+  test([10, 13, 14, 17], 17, 18, [10, 13, 14, 18]);
+  test([10, 13, 14, 17], 17, 19, [10, 13, 14, 19]);
+  test([10, 13, 14, 17], 18, 19, [10, 13, 14, 17, 18, 19]);
+
+  test([10, 13, 16, 19],  7, 14, [ 7, 14, 16, 19]);
+  test([10, 13, 16, 19],  7, 15, [ 7, 15, 16, 19]);
+  test([10, 13, 16, 19],  7, 16, [ 7, 19]);
+  test([10, 13, 16, 19],  8, 14, [ 8, 14, 16, 19]);
+  test([10, 13, 16, 19],  8, 15, [ 8, 15, 16, 19]);
+  test([10, 13, 16, 19],  8, 16, [ 8, 19]);
+  test([10, 13, 16, 19],  9, 14, [ 9, 14, 16, 19]);
+  test([10, 13, 16, 19],  9, 15, [ 9, 15, 16, 19]);
+  test([10, 13, 16, 19],  9, 16, [ 9, 19]);
+  test([10, 13, 16, 19], 10, 14, [10, 14, 16, 19]);
+  test([10, 13, 16, 19], 10, 15, [10, 15, 16, 19]);
+  test([10, 13, 16, 19], 10, 16, [10, 19]);
+  test([10, 13, 16, 19], 11, 14, [10, 14, 16, 19]);
+  test([10, 13, 16, 19], 11, 15, [10, 15, 16, 19]);
+  test([10, 13, 16, 19], 11, 16, [10, 19]);
+  test([10, 13, 16, 19], 12, 14, [10, 14, 16, 19]);
+  test([10, 13, 16, 19], 12, 15, [10, 15, 16, 19]);
+  test([10, 13, 16, 19], 12, 16, [10, 19]);
+  test([10, 13, 16, 19], 13, 14, [10, 14, 16, 19]);
+  test([10, 13, 16, 19], 13, 15, [10, 15, 16, 19]);
+  test([10, 13, 16, 19], 13, 16, [10, 19]);
+  test([10, 13, 16, 19], 14, 15, [10, 13, 14, 15, 16, 19]);
+  test([10, 13, 16, 19], 14, 16, [10, 13, 14, 19]);
+  test([10, 13, 16, 19], 15, 16, [10, 13, 15, 19]);
+
+  run_next_test();
+});
+
+add_test(function test_ril_consts_cellbroadcast_misc() {
+  // Must be 16 for indexing.
+  equal(CB_DCS_LANG_GROUP_1.length, 16);
+  equal(CB_DCS_LANG_GROUP_2.length, 16);
+
+  // Array length must be even.
+  equal(CB_NON_MMI_SETTABLE_RANGES.length & 0x01, 0);
+  for (let i = 0; i < CB_NON_MMI_SETTABLE_RANGES.length;) {
+    let from = CB_NON_MMI_SETTABLE_RANGES[i++];
+    let to = CB_NON_MMI_SETTABLE_RANGES[i++];
+    equal(from < to, true);
+  }
+
+  run_next_test();
+});
+
+add_test(function test_ril_worker_checkCellBroadcastMMISettable() {
+  let worker = newWorker({
+    postRILMessage: function(data) {
+      // Do nothing
+    },
+    postMessage: function(message) {
+      // Do nothing
+    }
+  });
+
+  let context = worker.ContextPool._contexts[0];
+  let ril = context.RIL;
+
+  function test(from, to, expected) {
+    equal(expected, ril._checkCellBroadcastMMISettable(from, to));
+  }
+
+  test(-2, -1, false);
+  test(-1, 0, false);
+  test(0, 1, true);
+  test(1, 1, false);
+  test(2, 1, false);
+  test(65536, 65537, false);
+
+  // We have both [4096, 4224), [4224, 4352), so it's actually [4096, 4352),
+  // and [61440, 65536), [65535, 65536), so it's actually [61440, 65536).
+  for (let i = 0; i < CB_NON_MMI_SETTABLE_RANGES.length;) {
+    let from = CB_NON_MMI_SETTABLE_RANGES[i++];
+    let to = CB_NON_MMI_SETTABLE_RANGES[i++];
+    if ((from != 4224) && (from != 65535)) {
+      test(from - 1, from, true);
+    }
+    test(from - 1, from + 1, false);
+    test(from - 1, to, false);
+    test(from - 1, to + 1, false);
+    test(from, from + 1, false);
+    test(from, to, false);
+    test(from, to + 1, false);
+    if ((from + 1) < to) {
+      test(from + 1, to, false);
+      test(from + 1, to + 1, false);
+    }
+    if ((to != 4224) && (to < 65535)) {
+      test(to, to + 1, true);
+      test(to + 1, to + 2, true);
+    }
+  }
+
+  run_next_test();
+});
rename from dom/system/gonk/tests/test_ril_worker_cellbroadcast.js
rename to dom/system/gonk/tests/test_ril_worker_cellbroadcast_gsm.js
--- a/dom/system/gonk/tests/test_ril_worker_cellbroadcast.js
+++ b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_gsm.js
@@ -2,57 +2,16 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 subscriptLoader.loadSubScript("resource://gre/modules/ril_consts.js", this);
 
 function run_test() {
   run_next_test();
 }
 
-function buildHexStr(aNum, aNumSemiOctets) {
-  let str = aNum.toString(16);
-  while (str.length < aNumSemiOctets) {
-    str = "0" + str;
-  }
-  return str;
-}
-
-function hexStringToParcelByteArrayData(hexString) {
-  let bytes = [];
-
-  let length = hexString.length / 2;
-
-  bytes.push(length & 0xFF);
-  bytes.push((length >>  8) & 0xFF);
-  bytes.push((length >> 16) & 0xFF);
-  bytes.push((length >> 24) & 0xFF);
-
-  for (let i = 0; i < hexString.length; i += 2) {
-    bytes.push(Number.parseInt(hexString.substr(i, 2), 16));
-  }
-
-  return bytes;
-}
-
-add_test(function test_ril_consts_cellbroadcast_misc() {
-  // Must be 16 for indexing.
-  equal(CB_DCS_LANG_GROUP_1.length, 16);
-  equal(CB_DCS_LANG_GROUP_2.length, 16);
-
-  // Array length must be even.
-  equal(CB_NON_MMI_SETTABLE_RANGES.length & 0x01, 0);
-  for (let i = 0; i < CB_NON_MMI_SETTABLE_RANGES.length;) {
-    let from = CB_NON_MMI_SETTABLE_RANGES[i++];
-    let to = CB_NON_MMI_SETTABLE_RANGES[i++];
-    equal(from < to, true);
-  }
-
-  run_next_test();
-});
-
 add_test(function test_ril_worker_GsmPDUHelper_readCbDataCodingScheme() {
   let worker = newWorker({
     postRILMessage: function(data) {
       // Do nothing
     },
     postMessage: function(message) {
       // Do nothing
     }
@@ -229,322 +188,8 @@ add_test(function test_ril_worker_GsmPDU
               [0x00, 0x00, 0x00, 0x40]],
             ["@", null, "@@"]);
   test_data([PDU_DCS_MSG_CODING_16BITS_ALPHABET, "@@", false,
               [0x00, 0x40]],
             ["@", null, "@@"]);
 
   run_next_test();
 });
-
-add_test(function test_ril_worker__checkCellBroadcastMMISettable() {
-  let worker = newWorker({
-    postRILMessage: function(data) {
-      // Do nothing
-    },
-    postMessage: function(message) {
-      // Do nothing
-    }
-  });
-
-  let context = worker.ContextPool._contexts[0];
-  let ril = context.RIL;
-
-  function test(from, to, expected) {
-    equal(expected, ril._checkCellBroadcastMMISettable(from, to));
-  }
-
-  test(-2, -1, false);
-  test(-1, 0, false);
-  test(0, 1, true);
-  test(1, 1, false);
-  test(2, 1, false);
-  test(65536, 65537, false);
-
-  // We have both [4096, 4224), [4224, 4352), so it's actually [4096, 4352),
-  // and [61440, 65536), [65535, 65536), so it's actually [61440, 65536).
-  for (let i = 0; i < CB_NON_MMI_SETTABLE_RANGES.length;) {
-    let from = CB_NON_MMI_SETTABLE_RANGES[i++];
-    let to = CB_NON_MMI_SETTABLE_RANGES[i++];
-    if ((from != 4224) && (from != 65535)) {
-      test(from - 1, from, true);
-    }
-    test(from - 1, from + 1, false);
-    test(from - 1, to, false);
-    test(from - 1, to + 1, false);
-    test(from, from + 1, false);
-    test(from, to, false);
-    test(from, to + 1, false);
-    if ((from + 1) < to) {
-      test(from + 1, to, false);
-      test(from + 1, to + 1, false);
-    }
-    if ((to != 4224) && (to < 65535)) {
-      test(to, to + 1, true);
-      test(to + 1, to + 2, true);
-    }
-  }
-
-  run_next_test();
-});
-
-add_test(function test_ril_worker__mergeCellBroadcastConfigs() {
-  let worker = newWorker({
-    postRILMessage: function(data) {
-      // Do nothing
-    },
-    postMessage: function(message) {
-      // Do nothing
-    }
-  });
-
-  let context = worker.ContextPool._contexts[0];
-  let ril = context.RIL;
-
-  function test(olist, from, to, expected) {
-    let result = ril._mergeCellBroadcastConfigs(olist, from, to);
-    equal(JSON.stringify(expected), JSON.stringify(result));
-  }
-
-  test(null, 0, 1, [0, 1]);
-
-  test([10, 13],  7,  8, [ 7,  8, 10, 13]);
-  test([10, 13],  7,  9, [ 7,  9, 10, 13]);
-  test([10, 13],  7, 10, [ 7, 13]);
-  test([10, 13],  7, 11, [ 7, 13]);
-  test([10, 13],  7, 12, [ 7, 13]);
-  test([10, 13],  7, 13, [ 7, 13]);
-  test([10, 13],  7, 14, [ 7, 14]);
-  test([10, 13],  7, 15, [ 7, 15]);
-  test([10, 13],  7, 16, [ 7, 16]);
-  test([10, 13],  8,  9, [ 8,  9, 10, 13]);
-  test([10, 13],  8, 10, [ 8, 13]);
-  test([10, 13],  8, 11, [ 8, 13]);
-  test([10, 13],  8, 12, [ 8, 13]);
-  test([10, 13],  8, 13, [ 8, 13]);
-  test([10, 13],  8, 14, [ 8, 14]);
-  test([10, 13],  8, 15, [ 8, 15]);
-  test([10, 13],  8, 16, [ 8, 16]);
-  test([10, 13],  9, 10, [ 9, 13]);
-  test([10, 13],  9, 11, [ 9, 13]);
-  test([10, 13],  9, 12, [ 9, 13]);
-  test([10, 13],  9, 13, [ 9, 13]);
-  test([10, 13],  9, 14, [ 9, 14]);
-  test([10, 13],  9, 15, [ 9, 15]);
-  test([10, 13],  9, 16, [ 9, 16]);
-  test([10, 13], 10, 11, [10, 13]);
-  test([10, 13], 10, 12, [10, 13]);
-  test([10, 13], 10, 13, [10, 13]);
-  test([10, 13], 10, 14, [10, 14]);
-  test([10, 13], 10, 15, [10, 15]);
-  test([10, 13], 10, 16, [10, 16]);
-  test([10, 13], 11, 12, [10, 13]);
-  test([10, 13], 11, 13, [10, 13]);
-  test([10, 13], 11, 14, [10, 14]);
-  test([10, 13], 11, 15, [10, 15]);
-  test([10, 13], 11, 16, [10, 16]);
-  test([10, 13], 12, 13, [10, 13]);
-  test([10, 13], 12, 14, [10, 14]);
-  test([10, 13], 12, 15, [10, 15]);
-  test([10, 13], 12, 16, [10, 16]);
-  test([10, 13], 13, 14, [10, 14]);
-  test([10, 13], 13, 15, [10, 15]);
-  test([10, 13], 13, 16, [10, 16]);
-  test([10, 13], 14, 15, [10, 13, 14, 15]);
-  test([10, 13], 14, 16, [10, 13, 14, 16]);
-  test([10, 13], 15, 16, [10, 13, 15, 16]);
-
-  test([10, 13, 14, 17],  7,  8, [ 7,  8, 10, 13, 14, 17]);
-  test([10, 13, 14, 17],  7,  9, [ 7,  9, 10, 13, 14, 17]);
-  test([10, 13, 14, 17],  7, 10, [ 7, 13, 14, 17]);
-  test([10, 13, 14, 17],  7, 11, [ 7, 13, 14, 17]);
-  test([10, 13, 14, 17],  7, 12, [ 7, 13, 14, 17]);
-  test([10, 13, 14, 17],  7, 13, [ 7, 13, 14, 17]);
-  test([10, 13, 14, 17],  7, 14, [ 7, 17]);
-  test([10, 13, 14, 17],  7, 15, [ 7, 17]);
-  test([10, 13, 14, 17],  7, 16, [ 7, 17]);
-  test([10, 13, 14, 17],  7, 17, [ 7, 17]);
-  test([10, 13, 14, 17],  7, 18, [ 7, 18]);
-  test([10, 13, 14, 17],  7, 19, [ 7, 19]);
-  test([10, 13, 14, 17],  8,  9, [ 8,  9, 10, 13, 14, 17]);
-  test([10, 13, 14, 17],  8, 10, [ 8, 13, 14, 17]);
-  test([10, 13, 14, 17],  8, 11, [ 8, 13, 14, 17]);
-  test([10, 13, 14, 17],  8, 12, [ 8, 13, 14, 17]);
-  test([10, 13, 14, 17],  8, 13, [ 8, 13, 14, 17]);
-  test([10, 13, 14, 17],  8, 14, [ 8, 17]);
-  test([10, 13, 14, 17],  8, 15, [ 8, 17]);
-  test([10, 13, 14, 17],  8, 16, [ 8, 17]);
-  test([10, 13, 14, 17],  8, 17, [ 8, 17]);
-  test([10, 13, 14, 17],  8, 18, [ 8, 18]);
-  test([10, 13, 14, 17],  8, 19, [ 8, 19]);
-  test([10, 13, 14, 17],  9, 10, [ 9, 13, 14, 17]);
-  test([10, 13, 14, 17],  9, 11, [ 9, 13, 14, 17]);
-  test([10, 13, 14, 17],  9, 12, [ 9, 13, 14, 17]);
-  test([10, 13, 14, 17],  9, 13, [ 9, 13, 14, 17]);
-  test([10, 13, 14, 17],  9, 14, [ 9, 17]);
-  test([10, 13, 14, 17],  9, 15, [ 9, 17]);
-  test([10, 13, 14, 17],  9, 16, [ 9, 17]);
-  test([10, 13, 14, 17],  9, 17, [ 9, 17]);
-  test([10, 13, 14, 17],  9, 18, [ 9, 18]);
-  test([10, 13, 14, 17],  9, 19, [ 9, 19]);
-  test([10, 13, 14, 17], 10, 11, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 10, 12, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 10, 13, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 10, 14, [10, 17]);
-  test([10, 13, 14, 17], 10, 15, [10, 17]);
-  test([10, 13, 14, 17], 10, 16, [10, 17]);
-  test([10, 13, 14, 17], 10, 17, [10, 17]);
-  test([10, 13, 14, 17], 10, 18, [10, 18]);
-  test([10, 13, 14, 17], 10, 19, [10, 19]);
-  test([10, 13, 14, 17], 11, 12, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 11, 13, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 11, 14, [10, 17]);
-  test([10, 13, 14, 17], 11, 15, [10, 17]);
-  test([10, 13, 14, 17], 11, 16, [10, 17]);
-  test([10, 13, 14, 17], 11, 17, [10, 17]);
-  test([10, 13, 14, 17], 11, 18, [10, 18]);
-  test([10, 13, 14, 17], 11, 19, [10, 19]);
-  test([10, 13, 14, 17], 12, 13, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 12, 14, [10, 17]);
-  test([10, 13, 14, 17], 12, 15, [10, 17]);
-  test([10, 13, 14, 17], 12, 16, [10, 17]);
-  test([10, 13, 14, 17], 12, 17, [10, 17]);
-  test([10, 13, 14, 17], 12, 18, [10, 18]);
-  test([10, 13, 14, 17], 12, 19, [10, 19]);
-  test([10, 13, 14, 17], 13, 14, [10, 17]);
-  test([10, 13, 14, 17], 13, 15, [10, 17]);
-  test([10, 13, 14, 17], 13, 16, [10, 17]);
-  test([10, 13, 14, 17], 13, 17, [10, 17]);
-  test([10, 13, 14, 17], 13, 18, [10, 18]);
-  test([10, 13, 14, 17], 13, 19, [10, 19]);
-  test([10, 13, 14, 17], 14, 15, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 14, 16, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 14, 17, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 14, 18, [10, 13, 14, 18]);
-  test([10, 13, 14, 17], 14, 19, [10, 13, 14, 19]);
-  test([10, 13, 14, 17], 15, 16, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 15, 17, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 15, 18, [10, 13, 14, 18]);
-  test([10, 13, 14, 17], 15, 19, [10, 13, 14, 19]);
-  test([10, 13, 14, 17], 16, 17, [10, 13, 14, 17]);
-  test([10, 13, 14, 17], 16, 18, [10, 13, 14, 18]);
-  test([10, 13, 14, 17], 16, 19, [10, 13, 14, 19]);
-  test([10, 13, 14, 17], 17, 18, [10, 13, 14, 18]);
-  test([10, 13, 14, 17], 17, 19, [10, 13, 14, 19]);
-  test([10, 13, 14, 17], 18, 19, [10, 13, 14, 17, 18, 19]);
-
-  test([10, 13, 16, 19],  7, 14, [ 7, 14, 16, 19]);
-  test([10, 13, 16, 19],  7, 15, [ 7, 15, 16, 19]);
-  test([10, 13, 16, 19],  7, 16, [ 7, 19]);
-  test([10, 13, 16, 19],  8, 14, [ 8, 14, 16, 19]);
-  test([10, 13, 16, 19],  8, 15, [ 8, 15, 16, 19]);
-  test([10, 13, 16, 19],  8, 16, [ 8, 19]);
-  test([10, 13, 16, 19],  9, 14, [ 9, 14, 16, 19]);
-  test([10, 13, 16, 19],  9, 15, [ 9, 15, 16, 19]);
-  test([10, 13, 16, 19],  9, 16, [ 9, 19]);
-  test([10, 13, 16, 19], 10, 14, [10, 14, 16, 19]);
-  test([10, 13, 16, 19], 10, 15, [10, 15, 16, 19]);
-  test([10, 13, 16, 19], 10, 16, [10, 19]);
-  test([10, 13, 16, 19], 11, 14, [10, 14, 16, 19]);
-  test([10, 13, 16, 19], 11, 15, [10, 15, 16, 19]);
-  test([10, 13, 16, 19], 11, 16, [10, 19]);
-  test([10, 13, 16, 19], 12, 14, [10, 14, 16, 19]);
-  test([10, 13, 16, 19], 12, 15, [10, 15, 16, 19]);
-  test([10, 13, 16, 19], 12, 16, [10, 19]);
-  test([10, 13, 16, 19], 13, 14, [10, 14, 16, 19]);
-  test([10, 13, 16, 19], 13, 15, [10, 15, 16, 19]);
-  test([10, 13, 16, 19], 13, 16, [10, 19]);
-  test([10, 13, 16, 19], 14, 15, [10, 13, 14, 15, 16, 19]);
-  test([10, 13, 16, 19], 14, 16, [10, 13, 14, 19]);
-  test([10, 13, 16, 19], 15, 16, [10, 13, 15, 19]);
-
-  run_next_test();
-});
-
-
-/**
- * Verify GsmPDUHelper#readUmtsCbMessage with numOfPages from 1 to 15.
- */
-add_test(function test_GsmPDUHelper_readUmtsCbMessage_MultiParts() {
-  let CB_UMTS_MESSAGE_PAGE_SIZE = 82;
-  let CB_MAX_CONTENT_PER_PAGE_7BIT = 93;
-  let workerHelper = newInterceptWorker(),
-      worker = workerHelper.worker,
-      context = worker.ContextPool._contexts[0],
-      GsmPDUHelper = context.GsmPDUHelper;
-
-  function test_MultiParts(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
-    }
-
-    worker.onRILMessage(0, newIncomingParcel(-1,
-                           RESPONSE_TYPE_UNSOLICITED,
-                           UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS,
-                           hexStringToParcelByteArrayData(pdu)));
-
-    let postedMessage = workerHelper.postedMessage;
-    equal("cellbroadcast-received", postedMessage.rilMessageType);
-    equal(postedMessage.fullBody.length,
-                aNumOfPages * CB_MAX_CONTENT_PER_PAGE_7BIT);
-  }
-
-  [1, 5, 15].forEach(function(i) {
-    test_MultiParts(i);
-  });
-
-  run_next_test();
-});
-
-/**
- * Verify GsmPDUHelper#readUmtsCbMessage with 8bit encoded.
- */
-add_test(function test_GsmPDUHelper_readUmtsCbMessage_Binary() {
-  let CB_UMTS_MESSAGE_PAGE_SIZE = 82;
-  let CB_MAX_CONTENT_PER_PAGE_7BIT = 93;
-  let TEXT_BINARY = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-                  + "FFFF";
-  let workerHelper = newInterceptWorker(),
-      worker = workerHelper.worker,
-      context = worker.ContextPool._contexts[0],
-      GsmPDUHelper = context.GsmPDUHelper;
-
-  function test_MultiPartsBinary(aNumOfPages) {
-    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
-            + buildHexStr(0, 4) // skip msg_id
-            + buildHexStr(0, 4) // skip SN
-            + buildHexStr(68, 2) // set DCS to 8bit data
-            + buildHexStr(aNumOfPages, 2); // set num_of_pages
-    for (let i = 1; i <= aNumOfPages; i++) {
-      pdu = pdu + TEXT_BINARY
-                + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
-    }
-
-    worker.onRILMessage(0, newIncomingParcel(-1,
-                           RESPONSE_TYPE_UNSOLICITED,
-                           UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS,
-                           hexStringToParcelByteArrayData(pdu)));
-
-    let postedMessage = workerHelper.postedMessage;
-    equal("cellbroadcast-received", postedMessage.rilMessageType);
-    equal(postedMessage.fullData.length,
-                aNumOfPages * CB_UMTS_MESSAGE_PAGE_SIZE);
-    for (let i = 0; i < postedMessage.fullData.length; i++) {
-      equal(postedMessage.fullData[i], 255);
-    }
-  }
-
-  [1, 5, 15].forEach(function(i) {
-    test_MultiPartsBinary(i);
-  });
-
-  run_next_test();
-});
new file mode 100644
--- /dev/null
+++ b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_umts.js
@@ -0,0 +1,122 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+subscriptLoader.loadSubScript("resource://gre/modules/ril_consts.js", this);
+
+function run_test() {
+  run_next_test();
+}
+
+function buildHexStr(aNum, aNumSemiOctets) {
+  let str = aNum.toString(16);
+  while (str.length < aNumSemiOctets) {
+    str = "0" + str;
+  }
+  return str;
+}
+
+function hexStringToParcelByteArrayData(hexString) {
+  let bytes = [];
+
+  let length = hexString.length / 2;
+
+  bytes.push(length & 0xFF);
+  bytes.push((length >>  8) & 0xFF);
+  bytes.push((length >> 16) & 0xFF);
+  bytes.push((length >> 24) & 0xFF);
+
+  for (let i = 0; i < hexString.length; i += 2) {
+    bytes.push(Number.parseInt(hexString.substr(i, 2), 16));
+  }
+
+  return bytes;
+}
+
+/**
+ * Verify GsmPDUHelper#readUmtsCbMessage with numOfPages from 1 to 15.
+ */
+add_test(function test_GsmPDUHelper_readUmtsCbMessage_MultiParts() {
+  let CB_UMTS_MESSAGE_PAGE_SIZE = 82;
+  let CB_MAX_CONTENT_PER_PAGE_7BIT = 93;
+  let workerHelper = newInterceptWorker(),
+      worker = workerHelper.worker,
+      context = worker.ContextPool._contexts[0],
+      GsmPDUHelper = context.GsmPDUHelper;
+
+  function test_MultiParts(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
+    }
+
+    worker.onRILMessage(0, newIncomingParcel(-1,
+                           RESPONSE_TYPE_UNSOLICITED,
+                           UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS,
+                           hexStringToParcelByteArrayData(pdu)));
+
+    let postedMessage = workerHelper.postedMessage;
+    equal("cellbroadcast-received", postedMessage.rilMessageType);
+    equal(postedMessage.fullBody.length,
+                aNumOfPages * CB_MAX_CONTENT_PER_PAGE_7BIT);
+  }
+
+  [1, 5, 15].forEach(function(i) {
+    test_MultiParts(i);
+  });
+
+  run_next_test();
+});
+
+/**
+ * Verify GsmPDUHelper#readUmtsCbMessage with 8bit encoded.
+ */
+add_test(function test_GsmPDUHelper_readUmtsCbMessage_Binary() {
+  let CB_UMTS_MESSAGE_PAGE_SIZE = 82;
+  let CB_MAX_CONTENT_PER_PAGE_7BIT = 93;
+  let TEXT_BINARY = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+                  + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+                  + "FFFF";
+  let workerHelper = newInterceptWorker(),
+      worker = workerHelper.worker,
+      context = worker.ContextPool._contexts[0],
+      GsmPDUHelper = context.GsmPDUHelper;
+
+  function test_MultiPartsBinary(aNumOfPages) {
+    let pdu = buildHexStr(CB_UMTS_MESSAGE_TYPE_CBS, 2) // msg_type
+            + buildHexStr(0, 4) // skip msg_id
+            + buildHexStr(0, 4) // skip SN
+            + buildHexStr(68, 2) // set DCS to 8bit data
+            + buildHexStr(aNumOfPages, 2); // set num_of_pages
+    for (let i = 1; i <= aNumOfPages; i++) {
+      pdu = pdu + TEXT_BINARY
+                + buildHexStr(CB_UMTS_MESSAGE_PAGE_SIZE, 2); // msg_info_length
+    }
+
+    worker.onRILMessage(0, newIncomingParcel(-1,
+                           RESPONSE_TYPE_UNSOLICITED,
+                           UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS,
+                           hexStringToParcelByteArrayData(pdu)));
+
+    let postedMessage = workerHelper.postedMessage;
+    equal("cellbroadcast-received", postedMessage.rilMessageType);
+    equal(postedMessage.fullData.length,
+                aNumOfPages * CB_UMTS_MESSAGE_PAGE_SIZE);
+    for (let i = 0; i < postedMessage.fullData.length; i++) {
+      equal(postedMessage.fullData[i], 255);
+    }
+  }
+
+  [1, 5, 15].forEach(function(i) {
+    test_MultiPartsBinary(i);
+  });
+
+  run_next_test();
+});
--- a/dom/system/gonk/tests/xpcshell.ini
+++ b/dom/system/gonk/tests/xpcshell.ini
@@ -20,18 +20,18 @@ skip-if = true
 [test_ril_worker_sms_cdma.js]
 [test_ril_worker_sms_cdmapduhelper.js]
 [test_ril_worker_sms_nl_tables.js]
 [test_ril_worker_sms_gsmpduhelper.js]
 [test_ril_worker_sms_segment_info.js]
 [test_ril_worker_smsc_address.js]
 [test_ril_worker_cf.js]
 [test_ril_worker_cellbroadcast_config.js]
-[test_ril_worker_cellbroadcast.js]
-skip-if = true # Bug 1207936
+[test_ril_worker_cellbroadcast_gsm.js]
+[test_ril_worker_cellbroadcast_umts.js]
 [test_ril_worker_ruim.js]
 [test_ril_worker_cw.js]
 [test_ril_worker_clir.js]
 [test_ril_worker_clip.js]
 [test_ril_worker_ssn.js]
 [test_ril_worker_voiceprivacy.js]
 [test_ril_worker_ecm.js]
 [test_ril_worker_stk.js]