Title: [266511] trunk
Revision
266511
Author
you...@apple.com
Date
2020-09-03 06:24:33 -0700 (Thu, 03 Sep 2020)

Log Message

Expose RTCPeerConnection.restartIce
https://bugs.webkit.org/show_bug.cgi?id=216072

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt:
* web-platform-tests/webrtc/idlharness.https.window-expected.txt:

Source/WebCore:

Add plubming code to expose restartIce.
Covered by rebased test.

* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::restartIce):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::restartIce):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (266510 => 266511)


--- trunk/LayoutTests/ChangeLog	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/ChangeLog	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1,3 +1,12 @@
+2020-09-03  Youenn Fablet  <you...@apple.com>
+
+        Expose RTCPeerConnection.restartIce
+        https://bugs.webkit.org/show_bug.cgi?id=216072
+
+        Reviewed by Darin Adler.
+
+        * TestExpectations:
+
 2020-09-03  Zalan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Fix nested inline box sizing and positioning

Modified: trunk/LayoutTests/TestExpectations (266510 => 266511)


--- trunk/LayoutTests/TestExpectations	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/TestExpectations	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1956,6 +1956,7 @@
 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState.html [ Pass Failure ]
 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-timing.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/webrtc/protocol/split.https.html [ Pass Failure ]
+imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce-onnegotiationneeded.https.html [ Pass Failure ]
 
 # Skip timing out test
 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https.html [ Skip ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (266510 => 266511)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1,5 +1,15 @@
 2020-09-03  Youenn Fablet  <you...@apple.com>
 
+        Expose RTCPeerConnection.restartIce
+        https://bugs.webkit.org/show_bug.cgi?id=216072
+
+        Reviewed by Darin Adler.
+
+        * web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt:
+        * web-platform-tests/webrtc/idlharness.https.window-expected.txt:
+
+2020-09-03  Youenn Fablet  <you...@apple.com>
+
         calling transceiver setCodecPreferences doesn't change the order of codecs in the offer/answer generated by the browser
         https://bugs.webkit.org/show_bug.cgi?id=215567
         <rdar://problem/67277554>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce-onnegotiationneeded.https-expected.txt (266510 => 266511)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce-onnegotiationneeded.https-expected.txt	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce-onnegotiationneeded.https-expected.txt	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1,3 +1,3 @@
 
-FAIL Negotiation needed when returning to stable does not fire too early promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
+PASS Negotiation needed when returning to stable does not fire too early 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt (266510 => 266511)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-restartIce.https-expected.txt	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1,15 +1,15 @@
 
-FAIL restartIce() does not trigger negotiation ahead of initial negotiation promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() has no effect on initial negotiation promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() fires negotiationneeded after initial negotiation promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() causes fresh ufrags promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() works in have-local-offer promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() works in initial have-local-offer promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() works in have-remote-offer promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() does nothing in initial have-remote-offer promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() survives remote offer promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() is satisfied by remote ICE restart promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() trumps {iceRestart: false} promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() survives rollback promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
-FAIL restartIce() survives remote offer containing partial restart promise_test: Unhandled rejection with value: object "TypeError: pc1.restartIce is not a function. (In 'pc1.restartIce()', 'pc1.restartIce' is undefined)"
+FAIL restartIce() does not trigger negotiation ahead of initial negotiation assert_equals: No negotiationneeded event expected (undefined) undefined but got (object) object "[object Event]"
+PASS restartIce() has no effect on initial negotiation 
+PASS restartIce() fires negotiationneeded after initial negotiation 
+PASS restartIce() causes fresh ufrags 
+PASS restartIce() works in have-local-offer 
+PASS restartIce() works in initial have-local-offer 
+PASS restartIce() works in have-remote-offer 
+PASS restartIce() does nothing in initial have-remote-offer 
+PASS restartIce() survives remote offer 
+PASS restartIce() is satisfied by remote ICE restart 
+PASS restartIce() trumps {iceRestart: false} 
+FAIL restartIce() survives rollback promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
+FAIL restartIce() survives remote offer containing partial restart assert_false: Restarted 2 expected false got true
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt (266510 => 266511)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt	2020-09-03 13:24:33 UTC (rev 266511)
@@ -38,7 +38,7 @@
 PASS RTCPeerConnection interface: attribute iceConnectionState 
 PASS RTCPeerConnection interface: attribute connectionState 
 FAIL RTCPeerConnection interface: attribute canTrickleIceCandidates assert_true: The prototype object must have a property "canTrickleIceCandidates" expected true got false
-FAIL RTCPeerConnection interface: operation restartIce() assert_own_property: interface prototype object missing non-static operation expected property "restartIce" missing
+PASS RTCPeerConnection interface: operation restartIce() 
 PASS RTCPeerConnection interface: operation getConfiguration() 
 FAIL RTCPeerConnection interface: operation setConfiguration(optional RTCConfiguration) assert_equals: property has wrong .length expected 0 but got 1
 PASS RTCPeerConnection interface: operation close() 
@@ -89,7 +89,7 @@
 PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceConnectionState" with the proper type 
 PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "connectionState" with the proper type 
 FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "canTrickleIceCandidates" with the proper type assert_inherits: property "canTrickleIceCandidates" not found in prototype chain
-FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "restartIce()" with the proper type assert_inherits: property "restartIce" not found in prototype chain
+PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "restartIce()" with the proper type 
 PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "getConfiguration()" with the proper type 
 PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "setConfiguration(optional RTCConfiguration)" with the proper type 
 PASS RTCPeerConnection interface: calling setConfiguration(optional RTCConfiguration) on new RTCPeerConnection() with too few arguments must throw TypeError 

Modified: trunk/Source/WebCore/ChangeLog (266510 => 266511)


--- trunk/Source/WebCore/ChangeLog	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/ChangeLog	2020-09-03 13:24:33 UTC (rev 266511)
@@ -1,3 +1,23 @@
+2020-09-03  Youenn Fablet  <you...@apple.com>
+
+        Expose RTCPeerConnection.restartIce
+        https://bugs.webkit.org/show_bug.cgi?id=216072
+
+        Reviewed by Darin Adler.
+
+        Add plubming code to expose restartIce.
+        Covered by rebased test.
+
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::restartIce):
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+        (WebCore::LibWebRTCPeerConnectionBackend::restartIce):
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
+
 2020-09-03  Zalan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Add support nested inline box sizing and positioning

Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h	2020-09-03 13:24:33 UTC (rev 266511)
@@ -109,6 +109,7 @@
     virtual RefPtr<RTCSessionDescription> currentRemoteDescription() const = 0;
     virtual RefPtr<RTCSessionDescription> pendingRemoteDescription() const = 0;
 
+    virtual void restartIce() = 0;
     virtual bool setConfiguration(MediaEndpointConfiguration&&) = 0;
 
     virtual void getStats(Ref<DeferredPromise>&&) = 0;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h	2020-09-03 13:24:33 UTC (rev 266511)
@@ -124,6 +124,7 @@
     RTCIceConnectionState iceConnectionState() const { return m_iceConnectionState; }
     RTCPeerConnectionState connectionState() const { return m_connectionState; }
 
+    void restartIce() { m_backend->restartIce(); }
     const RTCConfiguration& getConfiguration() const { return m_configuration; }
     ExceptionOr<void> setConfiguration(RTCConfiguration&&);
     void close();

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2020-09-03 13:24:33 UTC (rev 266511)
@@ -101,6 +101,7 @@
     // FIXME 169644: missing canTrickleIceCandidates
     // FIXME 169644: missing defaultIceServers
 
+    undefined restartIce();
     RTCConfiguration getConfiguration();
     [MayThrowException] undefined setConfiguration(RTCConfiguration configuration);
     undefined close();

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp	2020-09-03 13:24:33 UTC (rev 266511)
@@ -81,6 +81,12 @@
         webrtc::field_trial::InitFieldTrialsFromString("WebRTC-H264Simulcast/Enabled/");
 }
 
+void LibWebRTCMediaEndpoint::restartIce()
+{
+    if (m_backend)
+        m_backend->RestartIce();
+}
+
 bool LibWebRTCMediaEndpoint::setConfiguration(LibWebRTCProvider& client, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration)
 {
     configuration.sdp_semantics = webrtc::SdpSemantics::kUnifiedPlan;

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h	2020-09-03 13:24:33 UTC (rev 266511)
@@ -75,6 +75,7 @@
     static Ref<LibWebRTCMediaEndpoint> create(LibWebRTCPeerConnectionBackend& peerConnection, LibWebRTCProvider& client) { return adoptRef(*new LibWebRTCMediaEndpoint(peerConnection, client)); }
     virtual ~LibWebRTCMediaEndpoint() = default;
 
+    void restartIce();
     bool setConfiguration(LibWebRTCProvider&, webrtc::PeerConnectionInterface::RTCConfiguration&&);
 
     webrtc::PeerConnectionInterface& backend() const { ASSERT(m_backend); return *m_backend.get(); }

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp	2020-09-03 13:24:33 UTC (rev 266511)
@@ -173,6 +173,11 @@
     return rtcConfiguration;
 }
 
+void LibWebRTCPeerConnectionBackend::restartIce()
+{
+    m_endpoint->restartIce();
+}
+
 bool LibWebRTCPeerConnectionBackend::setConfiguration(MediaEndpointConfiguration&& configuration)
 {
     auto* page = downcast<Document>(*m_peerConnection.scriptExecutionContext()).page();

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h (266510 => 266511)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h	2020-09-03 11:22:19 UTC (rev 266510)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h	2020-09-03 13:24:33 UTC (rev 266511)
@@ -66,6 +66,7 @@
     void doAddIceCandidate(RTCIceCandidate&) final;
     void doStop() final;
     std::unique_ptr<RTCDataChannelHandler> createDataChannelHandler(const String&, const RTCDataChannelInit&) final;
+    void restartIce() final;
     bool setConfiguration(MediaEndpointConfiguration&&) final;
     void getStats(Ref<DeferredPromise>&&) final;
     void getStats(RTCRtpSender&, Ref<DeferredPromise>&&) final;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to