Bug 1660181 [wpt PR 25138] - [RTCInsertableStreams] Add support for readable/writable fields, a=testonly
authorGuido Urdaneta <guidou@chromium.org>
Wed, 26 Aug 2020 08:50:17 +0000
changeset 546442 f3ab6c5183be0180817e7c9b018802a3693aa8bc
parent 546441 2baf6f9f32c0d392d5bf5b32421b3b8718fc08b6
child 546443 87ee5d4898acd6e62af5b7ff17d7f620ba526aae
push id37735
push userabutkovits@mozilla.com
push dateThu, 27 Aug 2020 21:29:40 +0000
treeherdermozilla-central@109f3a4de567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1660181, 25138, 1119653, 2366592, 800032
milestone82.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1660181 [wpt PR 25138] - [RTCInsertableStreams] Add support for readable/writable fields, a=testonly Automatic update from web-platform-tests [RTCInsertableStreams] Add support for readable/writable fields This CL adds the readable and writable fields to the RTCInsertableStreams dictionary. These are equivalent to and will replace readableStream and writableStream. The reason for this is consistency with other APIs that use stream pairs. Drive-by: rename RTCCodedVideoFrameType to RTCEncodedVideoFrameType to match the spec and update tests to comply with other API changes. Bug: 1119653 Change-Id: I64bcafb2602fb952722f1845abaeebd09f3e77d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366592 Reviewed-by: Harald Alvestrand <hta@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#800032} -- wpt-commits: b385c85f8210742df3764042b8f098a3a0c5f1a2 wpt-pr: 25138
testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedAudioFrame-serviceworker-failure.https.html
testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedVideoFrame-serviceworker-failure.https.html
--- a/testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedAudioFrame-serviceworker-failure.https.html
+++ b/testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedAudioFrame-serviceworker-failure.https.html
@@ -5,29 +5,29 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="../webrtc/RTCPeerConnection-helper.js"></script>
 <script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script>
 
 <script>
 "use strict";
 promise_test(async t => {
-  const caller = new RTCPeerConnection({forceEncodedAudioInsertableStreams:true});
+  const caller = new RTCPeerConnection({encodedInsertableStreams:true});
   t.add_cleanup(() => caller.close());
   const callee = new RTCPeerConnection();
   t.add_cleanup(() => callee.close());
 
   const stream = await navigator.mediaDevices.getUserMedia({audio:true});
   const track = stream.getTracks()[0];
   t.add_cleanup(() => track.stop());
 
   const sender = caller.addTrack(track)
-  const streams = sender.createEncodedAudioStreams();
-  const reader = streams.readableStream.getReader();
-  const writer = streams.writableStream.getWriter();
+  const streams = sender.createEncodedStreams();
+  const reader = streams.readable.getReader();
+  const writer = streams.writable.getWriter();
 
   exchangeIceCandidates(caller, callee);
   await exchangeOfferAnswer(caller, callee);
 
   const result = await reader.read();
   const scope = "resources/blank.html";
   let reg = await service_worker_unregister_and_register(t, "resources/serviceworker-failure.js", scope);
   t.add_cleanup(() => service_worker_unregister(t, scope));
--- a/testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedVideoFrame-serviceworker-failure.https.html
+++ b/testing/web-platform/tests/webrtc-insertable-streams/RTCEncodedVideoFrame-serviceworker-failure.https.html
@@ -5,29 +5,29 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="../webrtc/RTCPeerConnection-helper.js"></script>
 <script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script>
 
 <script>
 "use strict";
 promise_test(async t => {
-  const caller = new RTCPeerConnection({forceEncodedVideoInsertableStreams:true});
+  const caller = new RTCPeerConnection({encodedInsertableStreams:true});
   t.add_cleanup(() => caller.close());
   const callee = new RTCPeerConnection();
   t.add_cleanup(() => callee.close());
 
   const stream = await navigator.mediaDevices.getUserMedia({video:true});
   const videoTrack = stream.getVideoTracks()[0];
   t.add_cleanup(() => videoTrack.stop());
 
   const videoSender = caller.addTrack(videoTrack)
-  const senderStreams = videoSender.createEncodedVideoStreams();
-  const senderReader = senderStreams.readableStream.getReader();
-  const senderWriter = senderStreams.writableStream.getWriter();
+  const senderStreams = videoSender.createEncodedStreams();
+  const senderReader = senderStreams.readable.getReader();
+  const senderWriter = senderStreams.writable.getWriter();
 
   exchangeIceCandidates(caller, callee);
   await exchangeOfferAnswer(caller, callee);
 
   const result = await senderReader.read();
   const scope = "resources/blank.html";
   const reg = await service_worker_unregister_and_register(t, "resources/serviceworker-failure.js", scope)
   t.add_cleanup(() => service_worker_unregister(t, scope));