Bug 912442 - Fix test_mms_pdu_helper.js. r=gene, a=leo+
authorEdgar Chen <echen@mozilla.com>
Fri, 06 Sep 2013 14:24:28 +0800
changeset 119955 0c3b698a2bfda01e0a1341e3fe684f4c41b3feda
parent 119954 e4cb5a852e3d7807e4da026e885186eb8dad5885
child 119956 41c15ddb7216618b562ceee175695bbf3b7b1c78
push id1093
push userryanvm@gmail.com
push dateSun, 27 Oct 2013 01:55:35 +0000
reviewersgene, leo
bugs912442
milestone18.1
Bug 912442 - Fix test_mms_pdu_helper.js. r=gene, a=leo+
dom/mobilemessage/tests/test_mms_pdu_helper.js
--- a/dom/mobilemessage/tests/test_mms_pdu_helper.js
+++ b/dom/mobilemessage/tests/test_mms_pdu_helper.js
@@ -807,22 +807,22 @@ add_test(function test_PduHelper_parseHe
   function parse(input, expect, exception) {
     let data = {array: input, offset: 0};
     do_check_throws(wsp_test_func.bind(null, MMS.PduHelper.parseHeaders, data, expect),
                     exception);
   }
 
   // Parse ends with Content-Type
   let expect = {};
-  expect["x-mms-mms-version"] = MMS_VERSION;
+  expect["x-mms-mms-version"] = MMS_VERSION_1_3;
   expect["content-type"] = {
     media: "application/vnd.wap.multipart.related",
     params: null,
   };
-  parse([0x80 | 0x0D, 0x80 | MMS_VERSION,   // X-Mms-Mms-Version: 1.3
+  parse([0x80 | 0x0D, 0x80 | MMS_VERSION_1_3,   // X-Mms-Mms-Version: 1.3
          0x80 | 0x04, 0x80 | 0x33,          // Content-Type: application/vnd.wap.multipart.related
          0x80 | 0x0C, MMS_PDU_TYPE_SEND_REQ // X-Mms-Message-Type: M-Send.req
         ], expect);
 
   // Parse header fields with multiple entries
   expect = {
     to: [
       { address: "+123", type: "PLMN" },
@@ -899,24 +899,24 @@ add_test(function test_PduHelper_encodeH
       data.array.pop();
     }
 
     return data.array;
   }
 
   let headers = {};
   headers["x-mms-message-type"] = MMS_PDU_TYPE_SEND_REQ;
-  headers["x-mms-mms-version"] = MMS_VERSION;
+  headers["x-mms-mms-version"] = MMS_VERSION_1_3;
   headers["x-mms-transaction-id"] = "asdf";
   headers["to"] = { address: "+123", type: "PLMN" };
   headers["content-type"] = {
     media: "application/vnd.wap.multipart.related",
   };
   wsp_encode_test_ex(func, headers,
                      Array.concat([0x80 | 0x0C, MMS_PDU_TYPE_SEND_REQ])
                           .concat([0x80 | 0x18]).concat(strToCharCodeArray(headers["x-mms-transaction-id"]))
-                          .concat([0x80 | 0x0D, 0x80 | MMS_VERSION])
+                          .concat([0x80 | 0x0D, 0x80 | MMS_VERSION_1_3])
                           .concat([0x80 | 0x17]).concat(strToCharCodeArray("+123/TYPE=PLMN"))
                           .concat([0x80 | 0x04, 0x80 | 0x33]));
 
   run_next_test();
 });