Missing test coverage for mozRTCPeerConnection and RTCStatsReport

RESOLVED FIXED in mozilla29

Status

()

Core
WebRTC
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mccr8, Assigned: jib)

Tracking

(Blocks: 1 bug)

unspecified
mozilla29
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
mozRTCPeerConnection has this: Constructor (optional RTCConfiguration configuration, optional object? constraints)]

I added some code to assert when a constraint is passed in, but it is never hit. So it seems like there should be some test cases for passing in null and passing in an actual object.

Similarly, the interface RTCStatsReport has
  void forEach(RTCStatsReportCallback callbackFn, optional any thisArg);
but again there are no tests in the test suite that pass in anything for thisArg, so something should be added to test those.
(In reply to Andrew McCreight [:mccr8] from comment #0)
> mozRTCPeerConnection has this: Constructor (optional RTCConfiguration
> configuration, optional object? constraints)]

We don't actually implement constraints (settings really) on RTCPeerConnection itself yet, just on createOffer/Answer (and soon addstream).

> Similarly, the interface RTCStatsReport has
>   void forEach(RTCStatsReportCallback callbackFn, optional any thisArg);
> but again there are no tests in the test suite that pass in anything for
> thisArg, so something should be added to test those.

The mochitests for this are still outstanding in Bug 902003.
(Reporter)

Comment 2

4 years ago
(In reply to Jan-Ivar Bruaroey [:jib] from comment #1)
> We don't actually implement constraints (settings really) on
> RTCPeerConnection itself yet, just on createOffer/Answer (and soon
> addstream).

Well, you must do something if somebody passes something in, right?  You could test that. ;)

> The mochitests for this are still outstanding in Bug 902003.

Okay, great.

Feel free to close this bug or whatever as appropriate.
(In reply to Andrew McCreight [:mccr8] from comment #2)
> (In reply to Jan-Ivar Bruaroey [:jib] from comment #1)
> > We don't actually implement constraints (settings really) on
> > RTCPeerConnection itself yet, just on createOffer/Answer (and soon
> > addstream).
> 
> Well, you must do something if somebody passes something in, right?

Not really. :-) PeerConnection.js ignores the arg entirely on the constructor.

> You could test that. ;)

Not sure what you mean.

> > The mochitests for this are still outstanding in Bug 902003.
> 
> Okay, great.
> 
> Feel free to close this bug or whatever as appropriate.

I'll leave it open as a reminder until I get those tests added. Thanks.
Depends on: 902003
Assignee: nobody → jib
Blocks: 964161
Tests landed in Bug 950855.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Depends on: 950855
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.