Closed Bug 1478367 Opened 6 years ago Closed 6 years ago

Move transceivers mochitest to web-platform-tests.

Categories

(Core :: WebRTC: Signaling, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jib, Assigned: jib)

Details

Attachments

(1 file, 5 obsolete files)

Chrome recently landed RTCRtpTransceivers behind a pref, so we should get our transceiver API mochitest into web-platform-tests ASAP, to ensure interop with Firefox.
Rank: 15
Comment on attachment 8994845 [details] Bug 1478367 - Move RTCRtpTransceiver API mochitest to web-platform-tests. https://reviewboard.mozilla.org/r/259388/#review266432 So this looks alright, provided we fix the firefox-specific stuff in a subsequent patch.
Attachment #8994845 - Flags: review?(docfaraday) → review+
Comment on attachment 8994846 [details] Bug 1478367 - Update transceivers web-platform-test to emit logs that reveal non-enumerable browser properties. https://reviewboard.mozilla.org/r/259390/#review266440 ::: testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html:159 (Diff revision 1) > - if (!hasProps(observed[prop], expected[prop])) { > - logExpected(expected); > - return false; > - } > + } > + if (Array.isArray(t) && Array.isArray(o)) { > + return t.map((tn, i) => comparable(o[i], tn)); What if t is shorter than o? Seems like this would compare equal after this change, which is not what happened before. Also, what if one is an array, but the other not? I guess if t is the array, would we fall through to the Object.keys stuff, which would give us something like "{0: <comparable stuff>, 1: <comparable stuff>, 2: <comparable stuff>, length: 3}"? I guess this is alright, although maybe a little confusing. If o is the array, then hasProps([5], {length: 1}) would pass, which is also a little weird.
Attachment #8994846 - Flags: review?(docfaraday) → review-
Comment on attachment 8994847 [details] Bug 1478367 - Fix Firefox-specific mid-checking in transceivers web-platform-test to work with Chrome Canary. https://reviewboard.mozilla.org/r/259392/#review266454 ::: testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html:178 (Diff revision 1) > + if (!("mid" in expected[i])) { > + assert_not_equals(transceiver.mid, null); This only does something non-surprising with "mid: null". It would probably be best if it behaved properly when you gave it a non-null mid (perhaps because you pulled it out of an earlier array of transceivers).
Attachment #8994847 - Flags: review?(docfaraday) → review+
Comment on attachment 8994846 [details] Bug 1478367 - Update transceivers web-platform-test to emit logs that reveal non-enumerable browser properties. https://reviewboard.mozilla.org/r/259390/#review266440 > What if t is shorter than o? Seems like this would compare equal after this change, which is not what happened before. > > > Also, what if one is an array, but the other not? I guess if t is the array, would we fall through to the Object.keys stuff, which would give us something like "{0: <comparable stuff>, 1: <comparable stuff>, 2: <comparable stuff>, length: 3}"? I guess this is alright, although maybe a little confusing. If o is the array, then hasProps([5], {length: 1}) would pass, which is also a little weird. Good catch on the shorter array. Fixed. On what happens if we get a non-array where an array is expected, yes it gets represented as you mention, which I think is fine. `comparable(o)` would never run into this, only `comparable(o, t)` where we input an explicit expectation. And in that case of expecting an array, any output that doesn't look like an array seems fine to me.
Comment on attachment 8994846 [details] Bug 1478367 - Update transceivers web-platform-test to emit logs that reveal non-enumerable browser properties. https://reviewboard.mozilla.org/r/259390/#review266692
Attachment #8994846 - Flags: review?(docfaraday) → review+
Comment on attachment 8995280 [details] Bug 1478367 - Lint and cleanup to follow wpt best practice. https://reviewboard.mozilla.org/r/259760/#review266800
Attachment #8995280 - Flags: review?(docfaraday) → review+
Attachment #8995281 - Flags: review?(docfaraday) → review+
Comment on attachment 8995288 [details] Bug 1478367 - Move RTCRtpTransceiver API mochitest to web-platform-tests. https://reviewboard.mozilla.org/r/259764/#review266804
Attachment #8995288 - Flags: review?(docfaraday) → review+
All tests pass in Firefox. When run on Chrome Canary [1] today, half the tests fail. I believe the tests are correct and failures legitimate bugs in Canary. Specifically: lack of support for muting, legacy OfferToReceiveAudio/Video, and transceiver.stop(): Summary Harness status: OK Found 36 tests 18 Pass 18 Fail Details Result Test Name Message Fail checkAddTransceiverNoTrack assert_equals: expected "[{currentDirection:null,direction:\"sendrecv\",mid:null,receiver:{track:{kind:\"audio\",muted:true,readyState:\"live\"}},sender:{track:null},stopped:false},{currentDirection:null,direction:\"sendrecv\",mid:null,receiver:{track:{kind:\"video\",muted:true,readyState:\"live\"}},sender:{track:null},stopped:false}]" but got "[{currentDirection:null,direction:\"sendrecv\",mid:null,receiver:{track:{kind:\"audio\",muted:false,readyState:\"live\"}},sender:{track:null},stopped:false},{currentDirection:null,direction:\"sendrecv\",mid:null,receiver:{track:{kind:\"video\",muted:false,readyState:\"live\"}},sender:{track:null},stopped:false}]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at Test.checkAddTransceiverNoTrack (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:193:5) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:577:32 Pass checkAddTransceiverWithTrack Pass checkAddTransceiverWithAddTrack Pass checkAddTransceiverWithDirection Pass checkAddTransceiverWithStream Fail checkAddTransceiverWithOfferToReceiveAudio assert_equals: expected "[{currentDirection:null,direction:\"recvonly\",mid:null,receiver:{track:{kind:\"audio\"}},sender:{track:null},stopped:false}]" but got "[]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at checkAddTransceiverWithOfferToReceive (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:395:5) Fail checkAddTransceiverWithOfferToReceiveVideo assert_equals: expected "[{currentDirection:null,direction:\"recvonly\",mid:null,receiver:{track:{kind:\"video\"}},sender:{track:null},stopped:false}]" but got "[]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at checkAddTransceiverWithOfferToReceive (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:395:5) Fail checkAddTransceiverWithOfferToReceiveBoth assert_equals: expected "[{currentDirection:null,direction:\"recvonly\",mid:null,receiver:{track:{kind:\"audio\"}},sender:{track:null},stopped:false},{currentDirection:null,direction:\"recvonly\",mid:null,receiver:{track:{kind:\"video\"}},sender:{track:null},stopped:false}]" but got "[]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at checkAddTransceiverWithOfferToReceive (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:395:5) Pass checkAddTransceiverWithSetRemoteOfferSending Pass checkAddTransceiverWithSetRemoteOfferNoSend Pass checkAddTransceiverBadKind Pass checkSetDirection Pass checkCurrentDirection Pass checkSendrecvWithNoSendTrack Pass checkSendrecvWithTracklessStream Pass checkAddTransceiverNoTrackDoesntPair Pass checkAddTransceiverWithTrackDoesntPair Pass checkAddTransceiverThenReplaceTrackDoesntPair Fail checkAddTransceiverThenAddTrackPairs assert_equals: expected "[{sender:{track:{}}}]" but got "[{sender:{track:{}}},{}]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at hasPropsAndUniqueMids (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:169:5) at Test.checkAddTransceiverThenAddTrackPairs (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:617:5) Pass checkAddTrackPairs Pass checkReplaceTrackNullDoesntPreventPairing Pass checkRemoveAndReadd Pass checkAddTrackExistingTransceiverThenRemove Fail checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkMute assert_equals: expected "[{receiver:{track:{kind:\"audio\",muted:true}}},{receiver:{track:{kind:\"video\",muted:true}}}]" but got "[{receiver:{track:{kind:\"audio\",muted:false}}},{receiver:{track:{kind:\"video\",muted:false}}}]" at hasProps (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:164:5) at Test.checkMute (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:1122:5) Fail checkOnAddStream assert_equals: Should have 1 addstream event expected 1 but got 0 at Test.checkOnAddStream (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:1248:5) Fail checkStop promise_test: Unhandled rejection with value: object "TypeError: stoppedTransceiver.stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterCreateOffer promise_test: Unhandled rejection with value: object "TypeError: pc1.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterSetLocalOffer promise_test: Unhandled rejection with value: object "TypeError: pc1.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterSetRemoteOffer promise_test: Unhandled rejection with value: object "TypeError: pc2.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterCreateAnswer promise_test: Unhandled rejection with value: object "TypeError: pc2.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterSetLocalAnswer promise_test: Unhandled rejection with value: object "TypeError: pc2.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkStopAfterClose assert_equals: Stopping a transceiver on a closed PC should throw. throws InvalidStateError expected "InvalidStateError" but got "TypeError" at checkThrows (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:15:7) at Test.checkStopAfterClose (https://web-platform.test:8443/webrtc/RTCRtpTransceiver.https.html:1710:11) Fail checkLocalRollback promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkRemoteRollback promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': The provided value 'rollback' is not a valid enum value of type RTCSdpType." Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 Fail checkMsectionReuse promise_test: Unhandled rejection with value: object "TypeError: pc2.getTransceivers(...)[0].stop is not a function" Error at AssertionError.get_stack (https://web-platform.test:8443/resources/testharness.js:2762:21) at new AssertionError (https://web-platform.test:8443/resources/testharness.js:2755:27) at assert (https://web-platform.test:8443/resources/testharness.js:2748:19) at Test.<anonymous> (https://web-platform.test:8443/resources/testharness.js:590:25) at Test.step (https://web-platform.test:8443/resources/testharness.js:1538:25) at https://web-platform.test:8443/resources/testharness.js:1562:35 [1] mach wpt --product chrome --binary /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --binary-arg='--enable-blink-features=RTCUnifiedPlanByDefault' testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s 15c466afe26915dda576dd521bff51d953e89b4d -d 0fe9aa9f75aa: rebasing 474851:15c466afe269 "Bug 1478367 - Move RTCRtpTransceiver API mochitest to web-platform-tests. r=bwc" merging testing/web-platform/meta/MANIFEST.json warning: conflicts while merging testing/web-platform/meta/MANIFEST.json! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
Attachment #8994845 - Attachment is obsolete: true
Attachment #8994846 - Attachment is obsolete: true
Attachment #8994847 - Attachment is obsolete: true
Attachment #8995280 - Attachment is obsolete: true
Attachment #8995281 - Attachment is obsolete: true
Squashed.
Pushed by jbruaroey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/61261702f7ac Move RTCRtpTransceiver API mochitest to web-platform-tests. r=bwc
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12222 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: