Backed out changeset b51678e8e5e8 (bug 1077075)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 29 Dec 2014 10:30:07 +0100
changeset 221475 4431d1b8a2473d8a66a72af69133243430ab1e62
parent 221474 b51678e8e5e8d4edd73cc36196d3ca278748bbea
child 221476 b53fc8b22dd64d610295f0c75175bf369a143687
push id53352
push usercbook@mozilla.com
push dateMon, 29 Dec 2014 15:17:49 +0000
treeherdermozilla-inbound@8530f5b7443b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1077075
milestone37.0a1
backs outb51678e8e5e8d4edd73cc36196d3ca278748bbea
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
Backed out changeset b51678e8e5e8 (bug 1077075)
dom/telephony/test/marionette/head.js
dom/telephony/test/marionette/test_incoming_connecting_hangup.js
dom/telephony/test/marionette/test_redundant_operations.js
--- a/dom/telephony/test/marionette/head.js
+++ b/dom/telephony/test/marionette/head.js
@@ -515,86 +515,73 @@ let emulator = (function() {
           if (typeof conferenceStateChangeCallback === "function") {
             conferenceStateChangeCallback();
           }
         });
 
       promises.push(promise);
     }
 
-    promise = call.answer();
-    promises.push(promise);
+    call.answer();
 
     return Promise.all(promises).then(() => call);
   }
 
   /**
    * Hold a call.
    *
    * @param call
    *        A TelephonyCall object.
    * @return Promise<TelephonyCall>
    */
   function hold(call) {
     log("Putting the call on hold.");
 
-    let promises = [];
-
     let promise = waitForNamedStateEvent(call, "holding")
       .then(() => waitForNamedStateEvent(call, "held"));
-    promises.push(promise);
 
-    promise = call.hold();
-    promises.push(promise);
+    call.hold();
 
-    return Promise.all(promises).then(() => call);
+    return promise;
   }
 
   /**
    * Resume a call.
    *
    * @param call
    *        A TelephonyCall object.
    * @return Promise<TelephonyCall>
    */
   function resume(call) {
     log("Resuming the held call.");
 
-    let promises = [];
-
     let promise = waitForNamedStateEvent(call, "resuming")
       .then(() => waitForNamedStateEvent(call, "connected"));
-    promises.push(promise);
 
-    promise = call.resume();
-    promises.push(promise);
+    call.resume();
 
-    return Promise.all(promises).then(() => call);
+    return promise;
   }
 
   /**
    * Locally hang up a call.
    *
    * @param call
    *        A TelephonyCall object.
    * @return Promise<TelephonyCall>
    */
   function hangUp(call) {
     log("Local hanging up the call: " + call.id.number);
 
-    let promises = [];
-
     let promise = waitForNamedStateEvent(call, "disconnecting")
       .then(() => waitForNamedStateEvent(call, "disconnected"));
-    promises.push(promise);
 
-    promise = call.hangUp();
-    promises.push(promise);
+    call.hangUp();
 
-    return Promise.all(promises).then(() => call);
+    return promise;
   }
 
   /**
    * Simulate an incoming call.
    *
    * @param number
    *        A string.
    * @param numberPresentation [optional]
--- a/dom/telephony/test/marionette/test_incoming_connecting_hangup.js
+++ b/dom/telephony/test/marionette/test_incoming_connecting_hangup.js
@@ -10,21 +10,19 @@ let inCall;
 
 function incoming() {
   return gRemoteDial(inNumber)
     .then(call => inCall = call)
     .then(() => gCheckAll(null, [inCall], "", [], [inInfo.incoming]));
 }
 
 function connecting() {
-  let promises = [
-    gWaitForNamedStateEvent(inCall, "connecting"),
-    inCall.answer()
-  ];
-  return Promise.all(promises).then(() => inCall);
+  let promise = gWaitForNamedStateEvent(inCall, "connecting");
+  inCall.answer();
+  return promise;
 }
 
 function hangUp() {
   return gHangUp(inCall)
     .then(() => gCheckAll(null, [], "", [], []));
 }
 
 function remoteHangUp() {
--- a/dom/telephony/test/marionette/test_redundant_operations.js
+++ b/dom/telephony/test/marionette/test_redundant_operations.js
@@ -13,23 +13,22 @@ function error(event, action) {
 }
 
 function checkUnexpected(msg, call, event1, event2, actionCallback) {
   let error1 = error.bind(this, event1, msg);
   let error2 = error.bind(this, event2, msg);
 
   call.addEventListener(event1, error1);
   call.addEventListener(event2, error2);
+  actionCallback();
 
-  return actionCallback().then(
-    () => ok(false, msg + "should be rejected."),
-    () => gDelay(2000).then(() => {
-      call.removeEventListener(event1, error1);
-      call.removeEventListener(event2, error2);
-    }));
+  return gDelay(2000).then(() => {
+    call.removeEventListener(event1, error1);
+    call.removeEventListener(event2, error2);
+  });
 }
 
 startTest(function() {
   gRemoteDial(inNumber)
     .then(call => inCall = call)
     .then(() => gAnswer(inCall))
     .then(() => checkUnexpected("answered an active call", inCall,
                                 "connecting", "connected",