This website requires JavaScript.
Explore
Help
Sign In
nephele
/
haikuwebkit
Watch
1
Star
0
Fork
You've already forked haikuwebkit
0
Code
Issues
Releases
Activity
haiku
haikuwebkit
/
LayoutTests
/
webrtc
/
datachannel
/
datachannel-page-cache-expe...
4 lines
30 B
Plaintext
Raw
Permalink
Normal View
History
Unescape
Escape
Allow to suspend RTCPeerConnection when not connected https://bugs.webkit.org/show_bug.cgi?id=202403 Reviewed by Chris Dumez. Source/ThirdParty/libwebrtc: Export rtc::TimeMillis() * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: Source/WebCore: Implement suspend/resume in RTCPeerConnection by sending suspend/resume to the libwebrtc media endpoint, which suspends/resumes its socket factory. We allow suspension when the connection is not connected. Pages with connected connections will not go in page cache yet. Tests: webrtc/datachannel/datachannel-page-cache-send.html webrtc/datachannel/datachannel-page-cache.html * Modules/mediastream/PeerConnectionBackend.h: (WebCore::PeerConnectionBackend::suspend): (WebCore::PeerConnectionBackend::resume): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const): (WebCore::RTCPeerConnection::suspend): (WebCore::RTCPeerConnection::resume): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::suspend): (WebCore::LibWebRTCMediaEndpoint::resume): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::LibWebRTCPeerConnectionBackend::suspend): (WebCore::LibWebRTCPeerConnectionBackend::resume): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: Source/WebKit: Implement suspend/resume of sockets by doing the following: - For UDP sockets, we simulate as if being sent data is queued when being suspended. the webrtc backend will then stop sending packets until the queue is emptied. At resume time, we do as if the queue is emptied and packets sent (even though packets are not sent). For incoming traffic, we ignore it when being suspended. - For TCP sockets, we close them at suspend time. We then notify at resume time that an error happeneded for these sockets to the webrtc backend. We cannot simulate packet dropping like in the UDP case. To manage resume/suspend, each socket now has a isSuspended state and a socket group. The socket group is per peer connection. A peer connection will notify the factory that it is suspended/resumed. The factory will iterate through all sockets and will suspend/resume each socket of the socket group. * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::RTCSocketFactory::RTCSocketFactory): (WebKit::RTCSocketFactory::CreateUdpSocket): (WebKit::RTCSocketFactory::CreateServerTcpSocket): (WebKit::RTCSocketFactory::CreateClientTcpSocket): (WebKit::RTCSocketFactory::CreateAsyncResolver): (WebKit::RTCSocketFactory::suspend): (WebKit::RTCSocketFactory::resume): (WebKit::LibWebRTCProvider::createSocketFactory): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/Network/webrtc/LibWebRTCSocket.cpp: (WebKit::LibWebRTCSocket::LibWebRTCSocket): (WebKit::LibWebRTCSocket::~LibWebRTCSocket): (WebKit::LibWebRTCSocket::signalReadPacket): (WebKit::LibWebRTCSocket::signalSentPacket): (WebKit::LibWebRTCSocket::SendTo): (WebKit::LibWebRTCSocket::Close): (WebKit::LibWebRTCSocket::SetOption): (WebKit::LibWebRTCSocket::resume): (WebKit::LibWebRTCSocket::suspend): * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): (WebKit::LibWebRTCSocketFactory::addSocket): (WebKit::LibWebRTCSocketFactory::removeSocket): (WebKit::LibWebRTCSocketFactory::forSocketInGroup): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: LayoutTests: * webrtc/datachannel/datachannel-page-cache-expected.txt: Added. * webrtc/datachannel/datachannel-page-cache-send-expected.txt: Added. * webrtc/datachannel/datachannel-page-cache-send.html: Added. * webrtc/datachannel/datachannel-page-cache.html: Added. Canonical link: https://commits.webkit.org/216062@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-04 16:30:17 +00:00
Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) https://bugs.webkit.org/show_bug.cgi?id=217016 Reviewed by Zalan Bujtas. Done with this command: find LayoutTests -name '*-expected.txt' | grep -v imported | xargs awk '/^CONSOLE MESSAGE:/ { next }; /^<\?xml/ { nextfile }; { print FILENAME; nextfile }' | xargs perl -i -pe 's/ +$//g' This affects many files, and it's not helpful to clog the change log with a list of them. Canonical link: https://commits.webkit.org/229803@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-27 02:15:19 +00:00
PASS datachannel-page-cache
Allow to suspend RTCPeerConnection when not connected https://bugs.webkit.org/show_bug.cgi?id=202403 Reviewed by Chris Dumez. Source/ThirdParty/libwebrtc: Export rtc::TimeMillis() * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: Source/WebCore: Implement suspend/resume in RTCPeerConnection by sending suspend/resume to the libwebrtc media endpoint, which suspends/resumes its socket factory. We allow suspension when the connection is not connected. Pages with connected connections will not go in page cache yet. Tests: webrtc/datachannel/datachannel-page-cache-send.html webrtc/datachannel/datachannel-page-cache.html * Modules/mediastream/PeerConnectionBackend.h: (WebCore::PeerConnectionBackend::suspend): (WebCore::PeerConnectionBackend::resume): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const): (WebCore::RTCPeerConnection::suspend): (WebCore::RTCPeerConnection::resume): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::suspend): (WebCore::LibWebRTCMediaEndpoint::resume): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::LibWebRTCPeerConnectionBackend::suspend): (WebCore::LibWebRTCPeerConnectionBackend::resume): * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: Source/WebKit: Implement suspend/resume of sockets by doing the following: - For UDP sockets, we simulate as if being sent data is queued when being suspended. the webrtc backend will then stop sending packets until the queue is emptied. At resume time, we do as if the queue is emptied and packets sent (even though packets are not sent). For incoming traffic, we ignore it when being suspended. - For TCP sockets, we close them at suspend time. We then notify at resume time that an error happeneded for these sockets to the webrtc backend. We cannot simulate packet dropping like in the UDP case. To manage resume/suspend, each socket now has a isSuspended state and a socket group. The socket group is per peer connection. A peer connection will notify the factory that it is suspended/resumed. The factory will iterate through all sockets and will suspend/resume each socket of the socket group. * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::RTCSocketFactory::RTCSocketFactory): (WebKit::RTCSocketFactory::CreateUdpSocket): (WebKit::RTCSocketFactory::CreateServerTcpSocket): (WebKit::RTCSocketFactory::CreateClientTcpSocket): (WebKit::RTCSocketFactory::CreateAsyncResolver): (WebKit::RTCSocketFactory::suspend): (WebKit::RTCSocketFactory::resume): (WebKit::LibWebRTCProvider::createSocketFactory): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/Network/webrtc/LibWebRTCSocket.cpp: (WebKit::LibWebRTCSocket::LibWebRTCSocket): (WebKit::LibWebRTCSocket::~LibWebRTCSocket): (WebKit::LibWebRTCSocket::signalReadPacket): (WebKit::LibWebRTCSocket::signalSentPacket): (WebKit::LibWebRTCSocket::SendTo): (WebKit::LibWebRTCSocket::Close): (WebKit::LibWebRTCSocket::SetOption): (WebKit::LibWebRTCSocket::resume): (WebKit::LibWebRTCSocket::suspend): * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: (WebKit::LibWebRTCSocketFactory::createServerTcpSocket): (WebKit::LibWebRTCSocketFactory::createUdpSocket): (WebKit::LibWebRTCSocketFactory::createClientTcpSocket): (WebKit::LibWebRTCSocketFactory::createNewConnectionSocket): (WebKit::LibWebRTCSocketFactory::addSocket): (WebKit::LibWebRTCSocketFactory::removeSocket): (WebKit::LibWebRTCSocketFactory::forSocketInGroup): * WebProcess/Network/webrtc/LibWebRTCSocketFactory.h: LayoutTests: * webrtc/datachannel/datachannel-page-cache-expected.txt: Added. * webrtc/datachannel/datachannel-page-cache-send-expected.txt: Added. * webrtc/datachannel/datachannel-page-cache-send.html: Added. * webrtc/datachannel/datachannel-page-cache.html: Added. Canonical link: https://commits.webkit.org/216062@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-04 16:30:17 +00:00