From 27555764e7d01edb6aa521b9df084cd7efebc95c Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Thu, 9 Jun 2016 15:18:35 +0200 Subject: [PATCH] Backed out changeset 6ce08f664f9c (bug 1208328) --- dom/media/tests/mochitest/head.js | 11 +-- dom/media/tests/mochitest/mochitest.ini | 1 - ...onnection_addtrack_removetrack_events.html | 70 ------------------- 3 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 dom/media/tests/mochitest/test_peerConnection_addtrack_removetrack_events.html diff --git a/dom/media/tests/mochitest/head.js b/dom/media/tests/mochitest/head.js index d8d13270d5d0..48ed605b5a7d 100644 --- a/dom/media/tests/mochitest/head.js +++ b/dom/media/tests/mochitest/head.js @@ -441,8 +441,8 @@ function checkMediaStreamTrackCloneAgainstOriginal(clone, original) { /*** Utility methods */ /** The dreadful setTimeout, use sparingly */ -function wait(time, message) { - return new Promise(r => setTimeout(() => r(message), time)); +function wait(time) { + return new Promise(r => setTimeout(r, time)); } /** The even more dreadful setInterval, use even more sparingly */ @@ -482,8 +482,8 @@ var addFinallyToPromise = promise => { /** Use event listener to call passed-in function on fire until it returns true */ var listenUntil = (target, eventName, onFire) => { return new Promise(resolve => target.addEventListener(eventName, - function callback(event) { - var result = onFire(event); + function callback() { + var result = onFire(); if (result) { target.removeEventListener(eventName, callback, false); resolve(result); @@ -609,7 +609,8 @@ function haveEvent(target, name, cancelPromise) { (cancelPromise || new Promise()).then(e => Promise.reject(e)), new Promise(resolve => target.addEventListener(name, listener = resolve)) ]); - return p.then(event => (target.removeEventListener(name, listener), event)); + p.then(() => target.removeEventListener(name, listener)); + return p; }; /** diff --git a/dom/media/tests/mochitest/mochitest.ini b/dom/media/tests/mochitest/mochitest.ini index 99a3d7e5a6ec..b825fb42e07b 100644 --- a/dom/media/tests/mochitest/mochitest.ini +++ b/dom/media/tests/mochitest/mochitest.ini @@ -83,7 +83,6 @@ skip-if = (toolkit == 'gonk' || buildapp == 'mulet' && debug) # copied from basi [test_getUserMedia_peerIdentity.html] skip-if = toolkit == 'gonk' || buildapp == 'mulet' # b2g(Bug 1021776, too --ing slow on b2g) [test_peerConnection_addIceCandidate.html] -[test_peerConnection_addtrack_removetrack_events.html] [test_peerConnection_basicAudio.html] skip-if = toolkit == 'gonk' # B2G emulator is too slow to handle a two-way audio call reliably [test_peerConnection_basicAudioNATSrflx.html] diff --git a/dom/media/tests/mochitest/test_peerConnection_addtrack_removetrack_events.html b/dom/media/tests/mochitest/test_peerConnection_addtrack_removetrack_events.html deleted file mode 100644 index 184b0eacd287..000000000000 --- a/dom/media/tests/mochitest/test_peerConnection_addtrack_removetrack_events.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -
-
-
- -