Bug 1526801 [wpt PR 15292] - [PeerConnection] Fire signalingstatechange event at the right time, a=testonly
☠☠ backed out by 66b1aba3fb43 ☠ ☠
authorGuido Urdaneta <guidou@chromium.org>
Wed, 06 Mar 2019 12:35:06 +0000
changeset 522276 fff147f5ba18269e1d3d1dc1861718f42c4aefe0
parent 522275 2f41234f6509a10f9ff8438bde2ec7b28f98cb76
child 522277 71e7983951a67fec1aab2a705f7b659a9c2dd19a
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1526801, 15292, 920200, 1458203, 634609
milestone67.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 1526801 [wpt PR 15292] - [PeerConnection] Fire signalingstatechange event at the right time, a=testonly Automatic update from web-platform-tests [PeerConnection] Fire signalingstatechange event at the right time Prior to this CL, the event was fired before the transceiver state was updated, in contradiction with the spec, which says it should be fired after the transceiver state is updated. Bug: 920200 Change-Id: I757cc0161a5da4888cd628619180e24a54dc732b Reviewed-on: https://chromium-review.googlesource.com/c/1458203 Commit-Queue: Guido Urdaneta <guidou@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#634609} -- wpt-commits: 0f4203743c56377734f9682abb015d56d6a1a71e wpt-pr: 15292
testing/web-platform/tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-onsignalingstatechanged.https.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>RTCPeerConnection onsignalingstatechanged</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="RTCPeerConnection-helper.js"></script>
+<script>
+
+promise_test(async t => {
+  const [track] = (await navigator.mediaDevices.getUserMedia({video: true})).getTracks();
+  t.add_cleanup(() => track.stop());
+  const pc1 = new RTCPeerConnection();
+  t.add_cleanup(() => pc1.close());
+  const pc2 = new RTCPeerConnection();
+  t.add_cleanup(() => pc2.close());
+  pc1.addTrack(track, new MediaStream());
+  await pc1.setLocalDescription(await pc1.createOffer());
+  await pc2.setRemoteDescription(pc1.localDescription);
+  const signalingStateChangeResolver = new Resolver();
+  pc2.onsignalingstatechange = t.step_func(e => {
+    const transceiver = pc2.getTransceivers()[0];
+    assert_equals(pc2.signalingState, "stable");
+    assert_equals(transceiver.currentDirection, "recvonly");
+    signalingStateChangeResolver.resolve();
+  });
+  await pc2.setLocalDescription(await pc2.createAnswer());
+  await signalingStateChangeResolver;
+});
+
+</script>