Closed
Bug 1115212
Opened 11 years ago
Closed 11 years ago
Webrtc mochitests assume all remote tracks are delivered in a single onaddstream callback
Categories
(Core :: WebRTC, defect)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: bwc, Assigned: drno)
References
Details
Attachments
(1 file, 4 obsolete files)
5.55 KB,
patch
|
drno
:
review+
|
Details | Diff | Splinter Review |
This baked-in assumption lives in dom/media/tests/mochitest/pc.js in |checkMediaTracks|:
http://dxr.mozilla.org/mozilla-central/source/dom/media/tests/mochitest/pc.js#2359
This will not hold once the msid work lands.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → drno
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8543411 [details] [diff] [review]
bug_1115212_onaddstream_counters.patch
As I keep getting 404's for trying to re-trigger test runs for the previous try run, here is another one:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=a816c818bcf4
Attachment #8543411 -
Flags: review?(docfaraday)
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 8543411 [details] [diff] [review]
bug_1115212_onaddstream_counters.patch
Review of attachment 8543411 [details] [diff] [review]:
-----------------------------------------------------------------
Just minor objections.
::: dom/media/tests/mochitest/pc.js
@@ +1543,5 @@
> this.mediaCheckers = [ ];
>
> this.dataChannels = [ ];
>
> + //this.onAddStreamFired = false;
Remove comment
@@ +2308,5 @@
> * The media constraints of the local and remote peer connection object
> */
> checkMediaTracks : function PCW_checkMediaTracks(constraintsRemote, onSuccess) {
> var self = this;
> + //var addStreamTimeout = null;
Remove commented out code here too
@@ +2360,5 @@
> + self.onAddStreamAudioCounter + self.onAddStreamVideoCounter;
> +
> + if (receivedRemoteTracks === expectedRemoteTracks) {
> + _checkMediaTracks(constraintsRemote, onSuccess);
> + } else if (receivedRemoteTracks >= expectedRemoteTracks) {
>
@@ +2361,5 @@
> +
> + if (receivedRemoteTracks === expectedRemoteTracks) {
> + _checkMediaTracks(constraintsRemote, onSuccess);
> + } else if (receivedRemoteTracks >= expectedRemoteTracks) {
> + ok(false, "Received more streams " + receivedRemoteTracks +
Trailing ws
@@ +2376,5 @@
> // we rely on the outer mochitest timeout to catch the case where
> // onaddstream never fires
> self.addStreamCallbacks.checkMediaTracks = function() {
> + _compareReceivedAndExpectedTracks(constraintsRemote, onSuccess);
> + }
Why not set this unconditionally, with a comment saying that we're doing this just in case we haven't received enough onaddstream callbacks yet?
Attachment #8543411 -
Flags: review?(docfaraday) → review-
Assignee | ||
Comment 4•11 years ago
|
||
Removed commented code and additional white space.
Attachment #8543411 -
Attachment is obsolete: true
Attachment #8545502 -
Flags: review?(docfaraday)
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #3)
> @@ +2376,5 @@
> > // we rely on the outer mochitest timeout to catch the case where
> > // onaddstream never fires
> > self.addStreamCallbacks.checkMediaTracks = function() {
> > + _compareReceivedAndExpectedTracks(constraintsRemote, onSuccess);
> > + }
>
> Why not set this unconditionally, with a comment saying that we're doing
> this just in case we haven't received enough onaddstream callbacks yet?
This gets in fact called every time onaddstream fires. Sorry if that is not clear.
This registers _compareReceivedAndExpectedTracks() as one of the functions which gets called by the onaddstream callback handler.
Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 8545502 [details] [diff] [review]
bug_1115212_onaddstream_counters.patch
Review of attachment 8545502 [details] [diff] [review]:
-----------------------------------------------------------------
One remaining nit.
::: dom/media/tests/mochitest/pc.js
@@ +2297,5 @@
> + self.onAddStreamAudioCounter + self.onAddStreamVideoCounter;
> +
> + if (receivedRemoteTracks === expectedRemoteTracks) {
> + _checkMediaTracks(constraintsRemote, onSuccess);
> + } else if (receivedRemoteTracks >= expectedRemoteTracks) {
Ok, my comment here was not very visible last time, this should be '>' right?
Attachment #8545502 -
Flags: review?(docfaraday) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Fixed remaining nit (if else condition).
Attachment #8545502 -
Attachment is obsolete: true
Attachment #8546017 -
Flags: review?(docfaraday)
Reporter | ||
Updated•11 years ago
|
Attachment #8546017 -
Flags: review?(docfaraday) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
Last try looked a little strange, lets try with a fresh one: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c3bc063026b8
Reporter | ||
Comment 10•11 years ago
|
||
I'm seeing oranges on Mulet with this; maybe caused by a missing semicolon where we set the checkMediaTracks callback? I've kicked off a try run to test this hypothesis.
Reporter | ||
Comment 11•11 years ago
|
||
Comment on attachment 8546017 [details] [diff] [review]
bug_1115212_onaddstream_counters.patch
Review of attachment 8546017 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/tests/mochitest/pc.js
@@ +2307,5 @@
> + receivedRemoteTracks + " vs " + expectedRemoteTracks + ")");
> + }
> + }
> +
> + if (expectedRemoteTracks < (self.onAddStreamAudioCounter +
Here's our problem, this needs to be '>'
Attachment #8546017 -
Flags: review+ → review-
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #11)
> > + if (expectedRemoteTracks < (self.onAddStreamAudioCounter +
>
> Here's our problem, this needs to be '>'
Good catch. Thanks!
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #8546017 -
Attachment is obsolete: true
Attachment #8549193 -
Flags: review?(docfaraday)
Reporter | ||
Comment 14•11 years ago
|
||
Comment on attachment 8549193 [details] [diff] [review]
bug_1115212_onaddstream_counters.patch
Review of attachment 8549193 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/tests/mochitest/pc.js
@@ +2315,4 @@
> // onaddstream never fires
> self.addStreamCallbacks.checkMediaTracks = function() {
> + _compareReceivedAndExpectedTracks(constraintsRemote, onSuccess);
> + }
We want a semicolon here, probably.
Attachment #8549193 -
Flags: review?(docfaraday) → review+
Assignee | ||
Comment 15•11 years ago
|
||
Added the missing semicolon.
Carrying forward r+=bwc
Attachment #8549193 -
Attachment is obsolete: true
Attachment #8549253 -
Flags: review+
Reporter | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•