Commit 942c295c authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Stabilize iframe-gc test against leaked PeerConnections

Bug: chromium:1091885
Change-Id: I227750422e785867f6510b7dfdee3704dac64e0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2234261Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776115}
parent a5547760
...@@ -6741,7 +6741,6 @@ crbug.com/1057060 fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.htm ...@@ -6741,7 +6741,6 @@ crbug.com/1057060 fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.htm
# Sheriff 2020-06-05 # Sheriff 2020-06-05
crbug.com/1091829 [ Mac ] fast/scrolling/scroll-non-composited-scroller.html [ Pass Failure ] crbug.com/1091829 [ Mac ] fast/scrolling/scroll-non-composited-scroller.html [ Pass Failure ]
crbug.com/1091829 [ Linux ] virtual/threaded-prefer-compositing/fast/scrolling/scroll-non-composited-scroller.html [ Pass Failure ] crbug.com/1091829 [ Linux ] virtual/threaded-prefer-compositing/fast/scrolling/scroll-non-composited-scroller.html [ Pass Failure ]
crbug.com/1091885 fast/peerconnection/RTCPeerConnection-iframe-gc.html [ Pass Failure ]
crbug.com/1091250 [ Win10 ] virtual/cors/http/tests/misc/resource-timing-sizes-multipart.html [ Pass Failure ] crbug.com/1091250 [ Win10 ] virtual/cors/http/tests/misc/resource-timing-sizes-multipart.html [ Pass Failure ]
crbug.com/1091948 [ Linux ] external/wpt/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm [ Pass Timeout ] crbug.com/1091948 [ Linux ] external/wpt/html/canvas/element/manual/fill-and-stroke-styles/canvas_colorsandstyles_createlineargradient_001.htm [ Pass Timeout ]
crbug.com/1092091 [ Mac ] virtual/dark-color-scheme/datetimelocal-picker/datetimelocal-open.html [ Pass Failure ] crbug.com/1092091 [ Mac ] virtual/dark-color-scheme/datetimelocal-picker/datetimelocal-open.html [ Pass Failure ]
...@@ -7,16 +7,20 @@ ...@@ -7,16 +7,20 @@
<body> <body>
<script> <script>
promise_test(async t => { promise_test(async t => {
// In case other tests that leak peerconnections have run before,
// we record the number of peerconnections at start. Promise_test
// is not supposed to execute in parallel with other tests.
const basePeerConnectionCount = internals.peerConnectionCount();
let iframe = document.createElement("iframe"); let iframe = document.createElement("iframe");
document.body.appendChild( iframe ); document.body.appendChild( iframe );
let iframe_pc = new iframe.contentWindow.RTCPeerConnection(); let iframe_pc = new iframe.contentWindow.RTCPeerConnection();
assert_equals(iframe_pc.signalingState, 'stable'); assert_equals(iframe_pc.signalingState, 'stable');
iframe.remove(); iframe.remove();
assert_equals(iframe_pc.signalingState, 'closed'); assert_equals(iframe_pc.signalingState, 'closed');
assert_equals(internals.peerConnectionCount(), 1); assert_equals(internals.peerConnectionCount(), basePeerConnectionCount + 1);
iframe_pc = null; iframe_pc = null;
await asyncGC(); await asyncGC();
assert_equals(internals.peerConnectionCount(), 0); assert_equals(internals.peerConnectionCount(), basePeerConnectionCount);
}, 'PeerConnection in iframe is closed and garbage collected'); }, 'PeerConnection in iframe is closed and garbage collected');
</script> </script>
</body> </body>
......
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