From 33c79b84912068bea7986ae769848c4f7cf2c191 Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 15 Feb 2013 14:42:26 -0800 Subject: [PATCH] Bug 837458 - Cleanup PC Test Framework to Allow for Better Maintainability and Reusability for Future Tests. r=ekr, r=jsmith --- dom/media/tests/mochitest/head.js | 128 +++- dom/media/tests/mochitest/pc.js | 648 ++++++++++++++++-- .../test_peerConnection_basicAudio.html | 102 +-- .../test_peerConnection_basicAudioVideo.html | 129 +--- ...eerConnection_basicAudioVideoCombined.html | 108 +-- .../test_peerConnection_basicVideo.html | 96 +-- .../test_peerConnection_bug822674.html | 40 +- .../test_peerConnection_bug825703.html | 102 ++- .../test_peerConnection_bug827843.html | 164 ++--- .../test_peerConnection_bug834153.html | 64 +- .../test_peerConnection_bug835370.html | 107 ++- .../test_peerConnection_bug840344.html | 214 +++--- 12 files changed, 1053 insertions(+), 849 deletions(-) diff --git a/dom/media/tests/mochitest/head.js b/dom/media/tests/mochitest/head.js index c9b00cc6be39..eb4f371e7072 100644 --- a/dom/media/tests/mochitest/head.js +++ b/dom/media/tests/mochitest/head.js @@ -9,13 +9,110 @@ var Cr = SpecialPowers.Cr; // Specifies whether we are using fake streams to run this automation var FAKE_ENABLED = true; + +/** + * Create the necessary HTML elements for head and body as used by Mochitests + * + * @param {object} meta + * Meta information of the test + * @param {string} meta.title + * Description of the test + * @param {string} [meta.bug] + * Bug the test was created for + * @param {boolean} [meta.visible=false] + * Visibility of the media elements + */ +function createHTML(meta) { + var test = document.getElementById('test'); + + // Create the head content + var elem = document.createElement('meta'); + elem.setAttribute('charset', 'utf-8'); + document.head.appendChild(elem); + + var title = document.createElement('title'); + title.textContent = meta.title; + document.head.appendChild(title); + + // Create the body content + var anchor = document.createElement('a'); + anchor.setAttribute('target', '_blank'); + + if (meta.bug) { + anchor.setAttribute('href', 'https://bugzilla.mozilla.org/show_bug.cgi?id=' + meta.bug); + } + + anchor.textContent = meta.title; + document.body.insertBefore(anchor, test); + + var display = document.createElement('p'); + display.setAttribute('id', 'display'); + document.body.insertBefore(display, test); + + var content = document.createElement('div'); + content.setAttribute('id', 'content'); + content.style.display = meta.visible ? 'block' : "none"; + document.body.appendChild(content); +} + + +/** + * Create the HTML element if it doesn't exist yet and attach + * it to the content node. + * + * @param {string} type + * Type of media element to create ('audio' or 'video') + * @param {string} label + * Description to use for the element + * @return {HTMLMediaElement} The created HTML media element + */ +function createMediaElement(type, label) { + var id = label + '_' + type; + var element = document.getElementById(id); + + // Sanity check that we haven't created the element already + if (element) + return element; + + element = document.createElement(type === 'audio' ? 'audio' : 'video'); + element.setAttribute('id', id); + element.setAttribute('height', 100); + element.setAttribute('width', 150); + element.setAttribute('controls', 'controls'); + document.getElementById('content').appendChild(element); + + return element; +} + + +/** + * Wrapper function for mozGetUserMedia to allow a singular area of control + * for determining whether we run this with fake devices or not. + * + * @param {Dictionary} constraints + * The constraints for this mozGetUserMedia callback + * @param {Function} onSuccess + * The success callback if the stream is successfully retrieved + * @param {Function} onError + * The error callback if the stream fails to be retrieved + */ +function getUserMedia(constraints, onSuccess, onError) { + constraints["fake"] = FAKE_ENABLED; + + info("Call getUserMedia for " + JSON.stringify(constraints)); + navigator.mozGetUserMedia(constraints, onSuccess, onError); +} + + /** * Setup any Mochitest for WebRTC by enabling the preference for - * peer connections. As by bug 797979 it will also enable mozGetUserMedia(). + * peer connections. As by bug 797979 it will also enable mozGetUserMedia() + * and disable the mozGetUserMedia() permission checking. * - * @param {Function} aCallback Test method to execute after initialization - * @param {Boolean} desktopSupportedOnly specifies if the test currently - * is known to work on desktop only + * @param {Function} aCallback + * Test method to execute after initialization + * @param {Boolean} desktopSupportedOnly + * Specifies if the test currently is known to work on desktop only */ function runTest(aCallback, desktopSupportedOnly) { SimpleTest.waitForExplicitFinish(); @@ -28,8 +125,9 @@ function runTest(aCallback, desktopSupportedOnly) { SimpleTest.finish(); } else { SpecialPowers.pushPrefEnv({'set': [ - ['media.peerconnection.enabled', true], - ['media.navigator.permission.denied', true]]}, function () { + ['media.peerconnection.enabled', true], + ['media.navigator.permission.denied', true]] + }, function () { try { aCallback(); } @@ -40,27 +138,13 @@ function runTest(aCallback, desktopSupportedOnly) { } } -/** - * Wrapper function for mozGetUserMedia to allow a singular area of control - * for determining whether we run this with fake devices or not. - * - * @param {Dictionary} constraints the constraints for this mozGetUserMedia - * callback - * @param {Function} onSuccess the success callback if the stream is - * successfully retrieved - * @param {Function} onError the error callback if the stream fails to be - * retrieved - */ -function getUserMedia(constraints, onSuccess, onError) { - constraints["fake"] = FAKE_ENABLED; - navigator.mozGetUserMedia(constraints, onSuccess, onError); -} /** * A callback function fired only under unexpected circumstances while * running the tests. Kills off the test as well gracefully. * - * @param {object} aObj The object fired back from the callback + * @param {object} aObj + * The object fired back from the callback */ function unexpectedCallbackAndFinish(aObj) { ok(false, "Unexpected error callback with " + aObj); diff --git a/dom/media/tests/mochitest/pc.js b/dom/media/tests/mochitest/pc.js index 1a16df88a18d..73611e7e3c85 100644 --- a/dom/media/tests/mochitest/pc.js +++ b/dom/media/tests/mochitest/pc.js @@ -3,75 +3,607 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -var PeerConnection = { - pc1_offer : null, - pc2_answer : null, +/** + * This class mimics a state machine and handles a list of commands by + * executing them synchronously. + * + * @constructor + * @param {object} framework + * A back reference to the framework which makes use of the class. It's + * getting passed in as parameter to each command callback. + */ +function CommandChain(framework) { + this._framework = framework; + + this._commands = [ ]; + this._current = 0; + + this.onFinished = null; +} + +CommandChain.prototype = { /** - * Establishes the peer connection between two clients + * Returns the index of the current command of the chain * - * @param {object) aPCLocal Local client - * @param {object} aPCRemote Remote client - * @param {function} aSuccessCallback Method to call when the connection has been established + * @returns {number} Index of the current command */ - handShake: function PC_handShake(aPCLocal, aPCRemote, aSuccessCallback) { - - function onCreateOfferSuccess(aOffer) { - pc1_offer = aOffer; - info("Calling setLocalDescription on local peer connection"); - aPCLocal.setLocalDescription(aOffer, onSetLocalDescriptionSuccess1, - unexpectedCallbackAndFinish); - } - - function onSetLocalDescriptionSuccess1() { - info("Calling setRemoteDescription on remote peer connection"); - aPCRemote.setRemoteDescription(pc1_offer, onSetRemoteDescriptionSuccess1, - unexpectedCallbackAndFinish); - } - - function onSetRemoteDescriptionSuccess1() { - info("Calling createAnswer on remote peer connection"); - aPCRemote.createAnswer(onCreateAnswerSuccess, unexpectedCallbackAndFinish); - } - - function onCreateAnswerSuccess(aAnswer) { - pc2_answer = aAnswer; - info("Calling setLocalDescription on remote peer connection"); - aPCRemote.setLocalDescription(aAnswer, onSetLocalDescriptionSuccess2, - unexpectedCallbackAndFinish); - } - - function onSetLocalDescriptionSuccess2() { - info("Calling setRemoteDescription on local peer connection"); - aPCLocal.setRemoteDescription(pc2_answer, onSetRemoteDescriptionSuccess2, - unexpectedCallbackAndFinish); - } - - function onSetRemoteDescriptionSuccess2() { - aSuccessCallback(); - } - - info("Calling createOffer on local peer connection"); - aPCLocal.createOffer(onCreateOfferSuccess, unexpectedCallbackAndFinish); + get current() { + return this._current; }, /** - * Finds the given media stream in the list of available streams. + * Checks if the chain has already processed all the commands * - * This function is necessary because localStreams and remoteStreams don't have - * an indexOf method. - * - * @param {object} aMediaStreamList List of available media streams - * @param {object} aMediaStream Media stream to check for - * @return {number} Index in the media stream list + * @returns {boolean} True, if all commands have been processed */ - findStream: function PC_findStream(aMediaStreamList, aMediaStream) { - for (var index = 0; index < aMediaStreamList.length; index++) { - if (aMediaStreamList[index] === aMediaStream) { - return index; + get finished() { + return this._current === this._commands.length; + }, + + /** + * Returns the assigned commands of the chain. + * + * @returns {Array[]} Commands of the chain + */ + get commands() { + return this._commands; + }, + + /** + * Sets new commands for the chain. All existing commands will be replaced. + * + * @param {Array[]} commands + * List of commands + */ + set commands(commands) { + this._commands = commands; + }, + + /** + * Execute the next command in the chain. + */ + executeNext : function () { + var self = this; + + function _executeNext() { + if (!self.finished) { + var step = self._commands[self._current]; + self._current++; + + info("Run step: " + step[0]); // Label + step[1](self._framework); // Execute step + } + else if (typeof(self.onFinished) === 'function') { + self.onFinished(); } } - return -1 + // To prevent building up the stack we have to execute the next + // step asynchronously + window.setTimeout(_executeNext, 0); + }, + + /** + * Add new commands to the end of the chain + * + * @param {Array[]} commands + * List of commands + */ + append: function (commands) { + this._commands = this._commands.concat(commands); + }, + + /** + * Returns the index of the specified command in the chain. + * + * @param {string} id + * Identifier of the command + * @returns {number} Index of the command + */ + indexOf: function (id) { + for (var i = 0; i < this._commands.length; i++) { + if (this._commands[i][0] === id) { + return i; + } + } + + return -1; + }, + + /** + * Inserts the new commands after the specified command. + * + * @param {string} id + * Identifier of the command + * @param {Array[]} commands + * List of commands + */ + insertAfter: function (id, commands) { + var index = this.indexOf(id); + + if (index > -1) { + var tail = this.removeAfter(id); + + this.append(commands); + this.append(tail); + } + }, + + /** + * Inserts the new commands before the specified command. + * + * @param {string} id + * Identifier of the command + * @param {Array[]} commands + * List of commands + */ + insertBefore: function (id, commands) { + var index = this.indexOf(id); + + if (index > -1) { + var tail = this.removeAfter(id); + var object = this.remove(id); + + this.append(commands); + this.append(object); + this.append(tail); + } + }, + + /** + * Removes the specified command + * + * @param {string} id + * Identifier of the command + * @returns {object[]} Removed command + */ + remove : function (id) { + return this._commands.splice(this.indexOf(id), 1); + }, + + /** + * Removes all commands after the specified one. + * + * @param {string} id + * Identifier of the command + * @returns {object[]} Removed commands + */ + removeAfter : function (id) { + var index = this.indexOf(id); + + if (index > -1) { + return this._commands.splice(index + 1); + } + + return null; + }, + + /** + * Removes all commands before the specified one. + * + * @param {string} id + * Identifier of the command + * @returns {object[]} Removed commands + */ + removeBefore : function (id) { + var index = this.indexOf(id); + + if (index > -1) { + return this._commands.splice(0, index); + } + + return null; + }, + + /** + * Replaces all commands after the specified one. + * + * @param {string} id + * Identifier of the command + * @returns {object[]} Removed commands + */ + replaceAfter : function (id, commands) { + var oldCommands = this.removeAfter(id); + this.append(commands); + + return oldCommands; + }, + + /** + * Replaces all commands before the specified one. + * + * @param {string} id + * Identifier of the command + * @returns {object[]} Removed commands + */ + replaceBefore : function (id, commands) { + var oldCommands = this.removeBefore(id); + this.insertBefore(id, commands); + + return oldCommands; + } +}; + + +/** + * Default list of commands to execute for a PeerConnection test. + */ +var commandsPeerConnection = [ + [ + 'PC_LOCAL_GUM', + function (test) { + test.pcLocal.getAllUserMedia(function () { + test.next(); + }); + } + ], + [ + 'PC_REMOTE_GUM', + function (test) { + test.pcRemote.getAllUserMedia(function () { + test.next(); + }); + } + ], + [ + 'PC_LOCAL_CREATE_OFFER', + function (test) { + test.pcLocal.createOffer(function () { + test.next(); + }); + } + ], + [ + 'PC_LOCAL_SET_LOCAL_DESCRIPTION', + function (test) { + test.pcLocal.setLocalDescription(test.pcLocal._last_offer, function () { + test.next(); + }); + } + ], + [ + 'PC_REMOTE_SET_REMOTE_DESCRIPTION', + function (test) { + test.pcRemote.setRemoteDescription(test.pcLocal._last_offer, function () { + test.next(); + }); + } + ], + [ + 'PC_REMOTE_CREATE_ANSWER', + function (test) { + test.pcRemote.createAnswer(function () { + test.next(); + }); + } + ], + [ + 'PC_LOCAL_SET_REMOTE_DESCRIPTION', + function (test) { + test.pcLocal.setRemoteDescription(test.pcRemote._last_answer, function () { + test.next(); + }); + } + ], + [ + 'PC_REMOTE_SET_LOCAL_DESCRIPTION', + function (test) { + test.pcRemote.setLocalDescription(test.pcRemote._last_answer, function () { + test.next(); + }); + } + ], + [ + 'PC_LOCAL_CHECK_MEDIA', + function (test) { + test.pcLocal.checkMedia(test.pcRemote.constraints); + test.next(); + } + ], + [ + 'PC_REMOTE_CHECK_MEDIA', + function (test) { + test.pcRemote.checkMedia(test.pcLocal.constraints); + test.next(); + } + ] +]; + +/** + * This class handles tests for peer connections. + * + * @constructor + * @param {object} [options={}] + * Optional options for the peer connection test + * @param {object} [options.config_pc1=undefined] + * Configuration for the local peer connection instance + * @param {object} [options.config_pc2=undefined] + * Configuration for the remote peer connection instance. If not defined + * the configuration from the local instance will be used + */ +function PeerConnectionTest(options) { + // If no options are specified make it an empty object + options = options || { }; + + this.pcLocal = new PeerConnectionWrapper('pcLocal', options.config_pc1); + this.pcRemote = new PeerConnectionWrapper('pcRemote', options.config_pc2 || options.config_pc1); + + // Create command chain instance and assign default commands + this.chain = new CommandChain(this); + this.chain.commands = commandsPeerConnection; + + var self = this; + this.chain.onFinished = function () { + self.teardown(); + } +} + +/** + * Executes the next command. + */ +PeerConnectionTest.prototype.next = function PCT_next() { + this.chain.executeNext(); +}; + +/** + * Sets the media constraints for both peer connection instances. + * + * @param {object} constraintsLocal + * Media constrains for the local peer connection instance + * @param constraintsRemote + */ +PeerConnectionTest.prototype.setMediaConstraints = +function PCT_setMediaConstraints(constraintsLocal, constraintsRemote) { + this.pcLocal.constraints = constraintsLocal; + this.pcRemote.constraints = constraintsRemote; +}; + +/** + * Start running the tests as assigned to the command chain. + */ +PeerConnectionTest.prototype.run = function PCT_run() { + this.next(); +}; + +/** + * Clean up the objects used by the test + */ +PeerConnectionTest.prototype.teardown = function PCT_teardown() { + if (this.pcLocal) { + this.pcLocal.close(); + this.pcLocal = null; + } + + if (this.pcRemote) { + this.pcRemote.close(); + this.pcRemote = null; + } + + info("Test finished"); + SimpleTest.finish(); +}; + + +/** + * This class handles acts as a wrapper around a PeerConnection instance. + * + * @constructor + * @param {string} label + * Description for the peer connection instance + * @param {object} configuration + * Configuration for the peer connection instance + */ +function PeerConnectionWrapper(label, configuration) { + this.configuration = configuration; + this.label = label; + + this.constraints = [ ]; + this.streams = [ ]; + + info("Creating new PeerConnectionWrapper: " + this.label); + this._pc = new mozRTCPeerConnection(this.configuration); + + var self = this; + this._pc.onaddstream = function (event) { + // Bug 834835: Assume type is video until we get get{Audio,Video}Tracks. + self.attachMedia(event.stream, 'video', 'remote'); + }; +} + +PeerConnectionWrapper.prototype = { + + /** + * Returns the local description. + * + * @returns {object} The local description + */ + get localDescription() { + return this._pc.localDescription; + }, + + /** + * Sets the local description. + * + * @param {object} desc + * The new local description + */ + set localDescription(desc) { + this._pc.localDescription = desc; + }, + + /** + * Returns the remote description. + * + * @returns {object} The remote description + */ + get remoteDescription() { + return this._pc.remoteDescription; + }, + + /** + * Sets the remote description. + * + * @param {object} desc + * The new remote description + */ + set remoteDescription(desc) { + this._pc.remoteDescription = desc; + }, + + /** + * Callback when we get media from either side. Also an appropriate + * HTML media element will be created. + * + * @param {MediaStream} stream + * Media stream to handle + * @param {string} type + * The type of media stream ('audio' or 'video') + * @param {string} side + * The location the stream is coming from ('local' or 'remote') + */ + attachMedia : function PCW_attachMedia(stream, type, side) { + info("Got media stream: " + type + " (" + side + ")"); + this.streams.push(stream); + + if (side === 'local') { + this._pc.addStream(stream); + } + + var element = createMediaElement(type, this._label + '_' + side); + element.mozSrcObject = stream; + element.play(); + }, + + /** + * Requests all the media streams as specified in the constrains property. + * + * @param {function} onSuccess + * Callback to execute if all media has been requested successfully + */ + getAllUserMedia : function PCW_GetAllUserMedia(onSuccess) { + var self = this; + + function _getAllUserMedia(constraintsList, index) { + if (index < constraintsList.length) { + var constraints = constraintsList[index]; + + getUserMedia(constraints, function (stream) { + var type = constraints; + + if (constraints.audio) { + type = 'audio'; + } + + if (constraints.video) { + type += 'video'; + } + + self.attachMedia(stream, type, 'local'); + + _getAllUserMedia(constraintsList, index + 1); + }, unexpectedCallbackAndFinish); + } else { + onSuccess(); + } + } + + info("Get " + this.constraints.length + " local streams"); + _getAllUserMedia(this.constraints, 0); + }, + + /** + * Creates an offer and automatically handles the failure case. + * + * @param {function} onSuccess + * Callback to execute if the offer was created successfully + */ + createOffer : function PCW_createOffer(onSuccess) { + var self = this; + + this._pc.createOffer(function (offer) { + info("Got offer: " + JSON.stringify(offer)); + self._last_offer = offer; + onSuccess(offer); + }, unexpectedCallbackAndFinish); + }, + + /** + * Creates an answer and automatically handles the failure case. + * + * @param {function} onSuccess + * Callback to execute if the answer was created successfully + */ + createAnswer : function PCW_createAnswer(onSuccess) { + var self = this; + + this._pc.createAnswer(function (answer) { + info('Got answer for ' + self.label + ': ' + JSON.stringify(answer)); + self._last_answer = answer; + onSuccess(answer); + }, unexpectedCallbackAndFinish); + }, + + /** + * Sets the local description and automatically handles the failure case. + * + * @param {object} sdp + * SDP for the local description request + * @param {function} onSuccess + * Callback to execute if the local description was set successfully + */ + setLocalDescription : function PCW_setLocalDescription(sdp, onSuccess) { + var self = this; + + this._pc.setLocalDescription(sdp, function () { + info("Successfully set the local description for " + self.label); + onSuccess(); + }, unexpectedCallbackAndFinish); + }, + + /** + * Sets the remote description and automatically handles the failure case. + * + * @param {object} sdp + * SDP for the remote description request + * @param {function} onSuccess + * Callback to execute if the remote description was set successfully + */ + setRemoteDescription : function PCW_setRemoteDescription(sdp, onSuccess) { + var self = this; + + this._pc.setRemoteDescription(sdp, function () { + info("Successfully set remote description for " + self.label); + onSuccess(); + }, unexpectedCallbackAndFinish); + }, + + /** + * Checks that we are getting the media we expect. + * + * @param {object} constraintsRemote + * The media constraints of the remote peer connection object + */ + checkMedia : function PCW_checkMedia(constraintsRemote) { + is(this._pc.localStreams.length, this.constraints.length, + this.label + ' has ' + this.constraints.length + ' local streams'); + + // TODO: change this when multiple incoming streams are allowed. + is(this._pc.remoteStreams.length, 1, + this.label + ' has ' + 1 + ' remote streams'); + }, + + /** + * Closes the connection + */ + close : function PCW_close() { + // It might be that a test has already closed the pc. In those cases + // we should not fail. + try { + this._pc.close(); + info(this.label + ": Closed connection."); + } catch (e) { + info(this.label + ": Failure in closing connection - " + e.message); + } } }; diff --git a/dom/media/tests/mochitest/test_peerConnection_basicAudio.html b/dom/media/tests/mochitest/test_peerConnection_basicAudio.html index 38416618a392..5490d7ff6da8 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicAudio.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudio.html @@ -1,109 +1,29 @@  - - - Basic audio-only peer connection + -Basic audio-only peer connection -

-
 
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html index f396ba80bd80..7cac507de21c 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html @@ -1,26 +1,13 @@  - - - Basic video-only peer connection + -Basic audio-video peer connection -

-
 
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html index 6d767649caa0..9030a3957c67 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html @@ -1,119 +1,29 @@  - - - Basic video-only peer connection + -Basic audio-video peer connection -

-
 
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_basicVideo.html b/dom/media/tests/mochitest/test_peerConnection_basicVideo.html index d6cd0089b285..82a1f0ab362a 100644 --- a/dom/media/tests/mochitest/test_peerConnection_basicVideo.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicVideo.html @@ -1,105 +1,25 @@  - - - Basic video-only peer connection + -Basic video-only peer connection -

-
 
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug822674.html b/dom/media/tests/mochitest/test_peerConnection_bug822674.html index c1c3505c1a8f..40aa6e5c7f52 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug822674.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug822674.html @@ -1,33 +1,29 @@ - - - Test for Bug 822674 + - - -Mozilla Bug 822674 -

-
+
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug825703.html b/dom/media/tests/mochitest/test_peerConnection_bug825703.html index 368546c0a846..e2e437886b16 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug825703.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug825703.html @@ -1,62 +1,58 @@ - - - Bug 825703: RTCConfiguration valid/invalid permutations - - - - - + + + -RTCConfiguration valid/invalid permutations -

-
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug827843.html b/dom/media/tests/mochitest/test_peerConnection_bug827843.html index 7848a22d123d..7fd4345bc4c0 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug827843.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug827843.html @@ -1,114 +1,94 @@ - - - Bug 827843: Ensure that localDescription and remoteDescription are null after close -Make sure functions act correctly after close() -

-
 
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug834153.html b/dom/media/tests/mochitest/test_peerConnection_bug834153.html index c0089d85e534..034bd57530f7 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug834153.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug834153.html @@ -1,57 +1,47 @@ - - - Bug 834153: Queue CreateAnswer in PeerConnection.js - - - - - + + + -Queue CreateAnswer in PeerConnection.js -

-
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug835370.html b/dom/media/tests/mochitest/test_peerConnection_bug835370.html index 799f4ff67ee3..45a967631935 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug835370.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug835370.html @@ -1,69 +1,66 @@ - - - Bug 835370: PeerConnection.createOffer valid/invalid constraints permutations - - - - - + + + -PeerConnection.createOffer constraints valid/invalid constraints permutations -

-
 
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug840344.html b/dom/media/tests/mochitest/test_peerConnection_bug840344.html index 189e8aff5add..35016837da6f 100644 --- a/dom/media/tests/mochitest/test_peerConnection_bug840344.html +++ b/dom/media/tests/mochitest/test_peerConnection_bug840344.html @@ -1,25 +1,14 @@ - - - Bug 840344: Assertion failure - - - - - + + + + - -Bug 840344 -

-
-