Backed out changeset ccde75e4b1af (bug 1004152) for Mnw bustage. DONTBUILD
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 08 May 2014 16:00:29 -0400
changeset 192234 1c4fdb3d772d
parent 192231 306759b08bbf
child 192239 ed09e2b74d14
push id3536
push userryanvm@gmail.com
push date2014-05-08 20:00 +0000
Treeherderresults
bugs1004152
milestone30.0
backs outccde75e4b1af
Backed out changeset ccde75e4b1af (bug 1004152) for Mnw bustage. DONTBUILD
dom/telephony/test/marionette/head.js
--- a/dom/telephony/test/marionette/head.js
+++ b/dom/telephony/test/marionette/head.js
@@ -42,46 +42,16 @@ let emulator = (function() {
   }
 
   return {
     run: run,
     waitFinish: waitFinish
   };
 }());
 
-// Delay 1s before each telephony.dial()
-// The workaround here should be removed after bug 1005816.
-
-let originalDial;
-
-function delayTelephonyDial() {
-  originalDial = telephony.dial;
-  telephony.dial = function(number, serviceId) {
-    let deferred = Promise.defer();
-
-    let startTime = Date.now();
-    waitFor(function() {
-      originalDial.call(telephony, number, serviceId).then(call => {
-        deferred.resolve(call);
-      }, cause => {
-        deferred.reject(cause);
-      });
-    }, function() {
-      duration = Date.now() - startTime;
-      return (duration >= 1000);
-    });
-
-    return deferred.promise;
-  };
-}
-
-function restoreTelephonyDial() {
-  telephony.dial = originalDial;
-}
-
 /**
  * Telephony related helper functions.
  */
 (function() {
   function checkInitialState() {
     log("Verify initial state.");
     ok(telephony, "telephony");
     is(telephony.active, null, "telephony.active");
@@ -132,27 +102,25 @@ function _startTest(permissions, test) {
   }
 
   function setUp() {
     log("== Test SetUp ==");
     permissionSetUp();
     // Make sure that we get the telephony after adding permission.
     telephony = window.navigator.mozTelephony;
     ok(telephony);
-    delayTelephonyDial();
     return clearCalls().then(checkInitialState);
   }
 
   // Extend finish() with tear down.
   finish = (function() {
     let originalFinish = finish;
 
     function tearDown() {
       log("== Test TearDown ==");
-      restoreTelephonyDial();
       emulator.waitFinish()
         .then(permissionTearDown)
         .then(function() {
           originalFinish.apply(this, arguments);
         });
     }
 
     return tearDown.bind(this);