Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 17:35:02 +0000 (17:35 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2018 17:35:02 +0000 (17:35 +0000)
commita7585623fe6e070989d385dfa36c832095046817
treee599e3458b660c45769969554a86ca7117231c1e
parentc2b16bc9d1c918c2d8244945f7429f107cada148
Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
https://bugs.webkit.org/show_bug.cgi?id=191603

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCPeerConnection-removeTrack.https-expected.txt:

Source/WebCore:

Make sure to check that the sender peer connection backend is matching.
Covered by rebased WPT test.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::removeTrack):
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::isCreatedBy const):
* Modules/mediastream/RTCRtpSender.h:

LayoutTests:

Removed obsolete test.

* fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt:
* fast/mediastream/RTCPeerConnection-add-removeTrack.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt
LayoutTests/fast/mediastream/RTCPeerConnection-add-removeTrack.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-removeTrack.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/mediastream/RTCRtpSender.cpp
Source/WebCore/Modules/mediastream/RTCRtpSender.h