MediaStream API: Schedule the RTCDataChannel events to be triggered at idle state
https://bugs.webkit.org/show_bug.cgi?id=101751
Reviewed by Adam Barth.
Source/Platform:
Making some WebRTCDataChannel methods const.
* chromium/public/WebRTCDataChannel.h:
(WebRTCDataChannel):
Source/WebCore:
This patch queues the events until the JS interpreter is in an idle state.
Existing tests cover this patch.
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::readyStateChanged):
(WebCore::RTCDataChannel::dataArrived):
(WebCore::RTCDataChannel::error):
(WebCore::RTCDataChannel::scheduleDispatchEvent):
(WebCore):
(WebCore::RTCDataChannel::scheduledEventTimerFired):
* Modules/mediastream/RTCDataChannel.h:
(RTCDataChannel):
* platform/chromium/support/WebRTCDataChannel.cpp:
(WebKit::WebRTCDataChannel::setBufferedAmount):
(WebKit::WebRTCDataChannel::readyStateChanged):
(WebKit::WebRTCDataChannel::dataArrived):
(WebKit::WebRTCDataChannel::error):
Tools:
Makes the data channel mocks to be synchronous instead of asynchronous to be able to
properly test RTCDataChannel event handling.
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::sendStringData):
(MockWebRTCPeerConnectionHandler::sendRawData):
LayoutTests:
Adding shouldNotTrow to the send() calls.
* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@134207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed