Implement the Selector argument to RTCPeerConnection.getStats
https://bugs.webkit.org/show_bug.cgi?id=99460
Patch by Harald Alvestrand <hta@google.com> on 2012-10-17
Reviewed by Adam Barth.
Source/Platform:
* chromium/public/WebRTCStatsRequest.h:
(WebKit):
(WebRTCStatsRequest):
Source/WebCore:
The change adds two new parameters to the RTCStatsRequest object:
stream and component. Together these are enough to identify a
MediaStreamTrack.
Test: fast/mediastream/RTCPeerConnection-statsSelector.html
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::streamDescriptor):
(WebCore):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStats):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::hasSelector):
(WebCore):
(WebCore::RTCStatsRequestImpl::stream):
(WebCore::RTCStatsRequestImpl::component):
* Modules/mediastream/RTCStatsRequestImpl.h:
(RTCStatsRequestImpl):
* platform/chromium/support/WebRTCStatsRequest.cpp:
(WebKit):
(WebKit::WebRTCStatsRequest::hasSelector):
(WebKit::WebRTCStatsRequest::stream):
(WebKit::WebRTCStatsRequest::component):
* platform/mediastream/RTCStatsRequest.h:
(WebCore):
(RTCStatsRequest):
Tools:
The MockWebRTCPeerConnectionHandler will return one object only
when it gets a selector, and an even number when there is no selector.
This allows to verify that the argument is passed, but not its value.
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::getStats):
LayoutTests:
* fast/mediastream/RTCPeerConnection-statsSelector-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-statsSelector.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@131584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed