Commit 8bac593b authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Test helper: In answer, apply remote description before local description.

This ensures that candidates generated at callee arrive after making
the caller ready to receive them.

Bug: chromium:1122106
Change-Id: Iae0643da57029db8df6b98ef417ee2d4136b2daa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404346
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806165}
parent 84e1d9f7
...@@ -6645,7 +6645,6 @@ crbug.com/1117613 media/video-error-networkState.html [ Failure Timeout ] ...@@ -6645,7 +6645,6 @@ crbug.com/1117613 media/video-error-networkState.html [ Failure Timeout ]
crbug.com/1120330 virtual/threaded/external/wpt/feature-policy/experimental-features/vertical-scroll-disabled-scrollbar-tentative.html [ Pass Failure ] crbug.com/1120330 virtual/threaded/external/wpt/feature-policy/experimental-features/vertical-scroll-disabled-scrollbar-tentative.html [ Pass Failure ]
# Sheriff 2020-08-26 # Sheriff 2020-08-26
crbug.com/1122106 external/wpt/webrtc/protocol/crypto-suite.https.html [ Pass Timeout ]
crbug.com/1122742 http/tests/devtools/sources/debugger/source-frame-inline-breakpoint-decorations.js [ Pass Timeout ] crbug.com/1122742 http/tests/devtools/sources/debugger/source-frame-inline-breakpoint-decorations.js [ Pass Timeout ]
crbug.com/1122582 external/wpt/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html [ Pass Failure ] crbug.com/1122582 external/wpt/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https.html [ Pass Failure ]
......
...@@ -539,8 +539,12 @@ async function exchangeOffer(caller, callee) { ...@@ -539,8 +539,12 @@ async function exchangeOffer(caller, callee) {
} }
// Performs an answer exchange caller -> callee. // Performs an answer exchange caller -> callee.
async function exchangeAnswer(caller, callee) { async function exchangeAnswer(caller, callee) {
await callee.setLocalDescription(await callee.createAnswer()); // Note that caller's remote description must be set first; if not,
await caller.setRemoteDescription(callee.localDescription); // there's a chance that candidates from callee arrive at caller before
// it has a remote description to apply them to.
const answer = await callee.createAnswer();
await caller.setRemoteDescription(answer);
await callee.setLocalDescription(answer);
} }
async function exchangeOfferAnswer(caller, callee) { async function exchangeOfferAnswer(caller, callee) {
await exchangeOffer(caller, callee); await exchangeOffer(caller, callee);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment