Bug 958782 - 3/3: fix test cases. r=gene,khuey
☠☠ backed out by 853c1946f8b3 ☠ ☠
authorVicamo Yang <vyang@mozilla.com>
Mon, 23 Jun 2014 20:56:01 +0800
changeset 190190 29a1c6a34550c29d07882e9910133507718bccd3
parent 190189 f06d2ba57fb31d33f7e51ee4f13147aa0fb28b6c
child 190191 b0299260cb743df0cae7d2cb405889bbdc7ffbd9
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgene, khuey
bugs958782
milestone33.0a1
Bug 958782 - 3/3: fix test cases. r=gene,khuey
dom/mobilemessage/tests/marionette/test_getsegmentinfofortext.js
dom/permission/tests/test_sms.html
dom/tests/mochitest/general/test_interfaces.html
--- a/dom/mobilemessage/tests/marionette/test_getsegmentinfofortext.js
+++ b/dom/mobilemessage/tests/marionette/test_getsegmentinfofortext.js
@@ -72,31 +72,18 @@ function addTest(text, segments, charsPe
 
     domRequest.onerror = function(e) {
       ok(false, "Failed to call getSegmentInfoForText().");
       tasks.finish();
     };
   });
 }
 
-function addTestThrows(text) {
-  tasks.push(function() {
-    log("Testing '" + text + "' ...");
-    try {
-      let domRequest = manager.getSegmentInfoForText(text);
-
-      ok(false, "Not thrown.");
-      tasks.finish();
-    } catch (e) {
-      tasks.next();
-    }
-  });
-}
-
-addTestThrows(null);
+addTest(null, 1, PDU_MAX_USER_DATA_7BIT,
+        PDU_MAX_USER_DATA_7BIT - "null".length);
 
 // Testing "undefined".
 addTest(undefined, 1, PDU_MAX_USER_DATA_7BIT,
         PDU_MAX_USER_DATA_7BIT - "undefined".length);
 
 // Testing numeric values.
 addTest(0,   1, PDU_MAX_USER_DATA_7BIT, PDU_MAX_USER_DATA_7BIT - "0".length);
 addTest(1.0, 1, PDU_MAX_USER_DATA_7BIT, PDU_MAX_USER_DATA_7BIT - "1".length);
--- a/dom/permission/tests/test_sms.html
+++ b/dom/permission/tests/test_sms.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript;version=1.8" src="file_framework.js"></script>
 <script type="application/javascript;version=1.8">
 var gData = [
   {
     perm: ["sms"],
     needParentPerm: true,
     obj: "mozMobileMessage",
-    idl: "nsIDOMMozMobileMessageManager",
+    webidl: "MozMobileMessageManager",
     settings: [["dom.sms.enabled", true]],
   },
 ]
 </script>
 </pre>
 </body>
 </html>
 
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -662,17 +662,17 @@ var interfaceNamesInGlobalScope =
     {name: "MozMobileConnection", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozMobileConnectionArray", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozMobileConnectionInfo", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozMobileNetworkInfo", b2g: true, pref: "dom.mobileconnection.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "MozMobileMessageManager",
+    {name: "MozMobileMessageManager", b2g: true, pref: "dom.sms.enabled"},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MozMobileMessageThread",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "MozNamedAttrMap",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNDEFRecord", b2g: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "MozNFCPeer", b2g: true},