Bug 1019358 - 2/2: test cases. r=sku
authorVicamo Yang <vyang@mozilla.com>
Thu, 05 Jun 2014 14:27:31 +0800
changeset 207089 1edaadcd7e6a7701e28d44ff18158327e05f0637
parent 207088 c6bf6c65c913bf4a7d567610ea415c25d523d064
child 207090 77d39c8fa666ac5674bda4f2c0d32404a4b70c3b
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssku
bugs1019358
milestone32.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 1019358 - 2/2: test cases. r=sku
dom/system/gonk/tests/test_ril_worker_icc.js
--- a/dom/system/gonk/tests/test_ril_worker_icc.js
+++ b/dom/system/gonk/tests/test_ril_worker_icc.js
@@ -2499,17 +2499,17 @@ add_test(function test_reading_ad_and_pa
   let buf    = context.Buf;
   let io     = context.ICCIOHelper;
 
   function do_test(mncLengthInEf, imsi, expectedMcc, expectedMnc) {
     ril.iccInfoPrivate.imsi = imsi;
 
     io.loadTransparentEF = function fakeLoadTransparentEF(options) {
       let ad = [0x00, 0x00, 0x00];
-      if (mncLengthInEf) {
+      if (typeof mncLengthInEf === 'number') {
         ad.push(mncLengthInEf);
       }
 
       // Write data size
       buf.writeInt32(ad.length * 2);
 
       // Write data
       for (let i = 0; i < ad.length; i++) {
@@ -2526,19 +2526,30 @@ add_test(function test_reading_ad_and_pa
 
     record.readAD();
 
     do_check_eq(ril.iccInfo.mcc, expectedMcc);
     do_check_eq(ril.iccInfo.mnc, expectedMnc);
   }
 
   do_test(undefined, "466923202422409", "466", "92" );
+  do_test(0x00,      "466923202422409", "466", "92" );
+  do_test(0x01,      "466923202422409", "466", "92" );
+  do_test(0x02,      "466923202422409", "466", "92" );
   do_test(0x03,      "466923202422409", "466", "923");
+  do_test(0x04,      "466923202422409", "466", "92" );
+  do_test(0xff,      "466923202422409", "466", "92" );
+
   do_test(undefined, "310260542718417", "310", "260");
+  do_test(0x00,      "310260542718417", "310", "260");
+  do_test(0x01,      "310260542718417", "310", "260");
   do_test(0x02,      "310260542718417", "310", "26" );
+  do_test(0x03,      "310260542718417", "310", "260");
+  do_test(0x04,      "310260542718417", "310", "260");
+  do_test(0xff,      "310260542718417", "310", "260");
 
   run_next_test();
 });
 
 add_test(function test_reading_optional_efs() {
   let worker = newUint8Worker();
   let context = worker.ContextPool._contexts[0];
   let record = context.SimRecordHelper;