Bug 813978 - Update SMS tests as required for SMS changes in 813978; r=fabrice
☠☠ backed out by c8102d94b2fd ☠ ☠
authorRob Wood <rwood@mozilla.com>
Mon, 17 Dec 2012 14:16:28 -0800
changeset 125593 39bf5d23ebe9
parent 125592 b1ea92a3149d
child 125594 f7fee43555d8
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs813978
milestone20.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 813978 - Update SMS tests as required for SMS changes in 813978; r=fabrice
dom/sms/tests/marionette/test_filter_number_multiple.js
dom/sms/tests/marionette/test_filter_number_single.js
dom/sms/tests/marionette/test_getmessage.js
dom/sms/tests/marionette/test_getmessages.js
--- a/dom/sms/tests/marionette/test_filter_number_multiple.js
+++ b/dom/sms/tests/marionette/test_filter_number_multiple.js
@@ -231,17 +231,16 @@ function getMsgs(secondNumber) {
     cleanUp();
   };
 }
 
 function verifyFoundMsgs(foundSmsList) {
   // Verify the SMS messages returned by getMessages are the correct ones
   for (var x = 0; x < foundSmsList.length; x++) {
     is(foundSmsList[x].id, smsList[x].id, "id");
-    is(foundSmsList[x].sender, smsList[x].sender, "number");
   }
   deleteAllMsgs(cleanUp);
 }
 
 function cleanUp() {
   sms.onreceived = null;
   SpecialPowers.removePermission("sms", document);
   SpecialPowers.clearUserPref("dom.sms.enabled");
--- a/dom/sms/tests/marionette/test_filter_number_single.js
+++ b/dom/sms/tests/marionette/test_filter_number_single.js
@@ -189,17 +189,16 @@ function getMsgs() {
     cleanUp();
   };
 }
 
 function verifyFoundMsgs(foundSmsList) {
   // Verify the SMS messages returned by getMessages are the correct ones
   for (var x = 0; x < foundSmsList.length; x++) {
     is(foundSmsList[x].id, smsList[x].id, "id");
-    is(foundSmsList[x].sender, smsList[x].sender, "number");
   }
   deleteAllMsgs(cleanUp);
 }
 
 function cleanUp() {
   sms.onreceived = null;
   SpecialPowers.removePermission("sms", document);
   SpecialPowers.clearUserPref("dom.sms.enabled");
--- a/dom/sms/tests/marionette/test_getmessage.js
+++ b/dom/sms/tests/marionette/test_getmessage.js
@@ -115,17 +115,17 @@ function getReceivedSms() {
     ok(event.target.result, "smsrequest event.target.result");
     let foundSms = event.target.result;
     is(foundSms.id, inSmsId, "SMS id matches");
     log("Got SMS (id: " + foundSms.id + ").");
     is(foundSms.body, inText, "SMS msg text matches");
     is(foundSms.delivery, "received", "delivery");
     is(foundSms.deliveryStatus, "success", "deliveryStatus");
     is(foundSms.read, false, "read");
-    isIn(foundSms.receiver, myNumberFormats, "receiver");
+    is(foundSms.receiver, null, "receiver (getMessage)");
     isIn(foundSms.sender, remoteNumberFormats, "sender");
     is(foundSms.messageClass, "normal", "messageClass");
     ok(foundSms.timestamp instanceof Date, "timestamp is instanceof date");
     is(foundSms.timestamp.getTime(), inSmsTimeStamp.getTime(), "timestamp matches");
     getSentSms();
   };
 
   requestRet.onerror = function(event) {
@@ -149,17 +149,17 @@ function getSentSms() {
     let foundSms = event.target.result;
     is(foundSms.id, outSmsId, "SMS id matches");
     log("Got SMS (id: " + foundSms.id + ").");
     is(foundSms.body, outText, "SMS msg text matches");
     is(foundSms.delivery, "sent", "delivery");
     is(foundSms.deliveryStatus, "pending", "deliveryStatus");
     is(foundSms.read, true, "read");
     isIn(foundSms.receiver, remoteNumberFormats, "receiver");
-    isIn(foundSms.sender, myNumberFormats, "sender");
+    is(foundSms.sender, null, "sender (getMessage)");
     is(foundSms.messageClass, "normal", "messageClass");
     ok(foundSms.timestamp instanceof Date, "timestamp is instanceof date");
     is(foundSms.timestamp.getTime(), outSmsTimeStamp.getTime(), "timestamp matches");
     deleteMsgs();
   };
 
   requestRet.onerror = function(event) {
     log("Received 'onerror' smsrequest event.");
--- a/dom/sms/tests/marionette/test_getmessages.js
+++ b/dom/sms/tests/marionette/test_getmessages.js
@@ -188,25 +188,17 @@ function verifyFoundMsgs(foundSmsList, r
   if (reverse) {
     smsList.reverse();
   }
   for (var x = 0; x < numberMsgs; x++) {
     is(foundSmsList[x].id, smsList[x].id, "id");
     is(foundSmsList[x].body, smsList[x].body, "body");
     is(foundSmsList[x].delivery, smsList[x].delivery, "delivery");
     is(foundSmsList[x].read, smsList[x].read, "read");
-
-    // Bug 805799: receiver null when onreceived event is fired, until do a
-    // getMessage. Default emulator (receiver) phone number is 15555215554
-    if (!smsList[x].receiver) {
-      isIn(foundSmsList[x].receiver, ["15555215554", "+15555215554"], "receiver");
-    } else {
-      isIn(foundSmsList[x].receiver, [smsList[x].receiver, "+15555215554"], "receiver");
-    }
-
+    is(foundSmsList[x].receiver, null, "receiver (getMessage)");
     isIn(foundSmsList[x].sender, [smsList[x].sender, "+15552229797"], "sender");
     is(foundSmsList[x].timestamp.getTime(), smsList[x].timestamp.getTime(),
         "timestamp");
   }
 
   log("Content in all of the returned SMS messages is correct.");
 
   if (!reverse) {