| Index: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-lifetime.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-lifetime.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-lifetime.html
|
| deleted file mode 100644
|
| index 7991384ffa2d53790831a0661c588aee61010bae..0000000000000000000000000000000000000000
|
| --- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-lifetime.html
|
| +++ /dev/null
|
| @@ -1,70 +0,0 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| -<script src="../../resources/js-test.js"></script>
|
| -</head>
|
| -<body>
|
| -<script>
|
| -description("Tests the RTCPeerConnection lifetime.");
|
| -
|
| -var dc = null;
|
| -
|
| -function dataChannelMessage(m)
|
| -{
|
| - testPassed("dataChannelMessage");
|
| - finishJSTest();
|
| -}
|
| -
|
| -function dataChannelOpen()
|
| -{
|
| - testPassed("dataChannelOpen");
|
| - dc.onmessage = dataChannelMessage;
|
| - shouldNotThrow("dc.send('xyzzy');");
|
| -}
|
| -
|
| -function createPeerConnectionAndDataChannel()
|
| -{
|
| - // The Peer Connection object is leaked
|
| - var pc = new webkitRTCPeerConnection({iceServers:[]}, null);
|
| - dc = pc.createDataChannel("label");
|
| - dc.onopen = dataChannelOpen;
|
| -}
|
| -
|
| -var pcB = null;
|
| -var observationB = null;
|
| -
|
| -// Test that the PeerConnection object is gc'd if close is called.
|
| -var pcA = new webkitRTCPeerConnection(null, null);
|
| -// Do not pass the object directly to observeGC function. This may
|
| -// remain live on this function's stack preventing GC from collecting
|
| -// it. Accessing the object inside an inner function will prevent any
|
| -// unneeded references on this function's stack.
|
| -var observationA = internals.observeGC((() => {return pcA;})());
|
| -pcA.close();
|
| -pcA = null;
|
| -asyncGC(function() {
|
| - shouldBeTrue('observationA.wasCollected');
|
| - observationA = null;
|
| -
|
| - // Test that the PeerConnection object is not gc'd if close is not called.
|
| - pcB = new webkitRTCPeerConnection(null, null);
|
| - // Do not pass the object directly to observeGC function. This may
|
| - // remain live on this function's stack preventing GC from collecting
|
| - // it. Accessing the object inside an inner function will prevent any
|
| - // unneeded references on this function's stack.
|
| - observationB = internals.observeGC((() => {return pcB;})());
|
| - pcB = null;
|
| - asyncGC(function() {
|
| - shouldBeFalse('observationB.wasCollected');
|
| - observationB = null;
|
| -
|
| - // This test times out if the Peer connection object is garbage collected.
|
| - createPeerConnectionAndDataChannel();
|
| - gc();
|
| - });
|
| -});
|
| -
|
| -window.jsTestIsAsync = true;
|
| -</script>
|
| -</body>
|
| -</html>
|
|
|