49 lines
1.2 KiB
HTML
49 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body onload="runTest()">
|
|
<script src="../resources/js-test-pre.js"></script>
|
|
<script>
|
|
description("This test asserts that Document doesn't leak when a CSS Animation is created.");
|
|
|
|
if (window.internals)
|
|
jsTestIsAsync = true;
|
|
|
|
gc();
|
|
|
|
var numberOfLiveDocumentsAfterIframeLoaded = 0;
|
|
|
|
function runTest() {
|
|
if (!window.internals)
|
|
return;
|
|
|
|
var frame = document.body.appendChild(document.createElement("iframe"));
|
|
|
|
frame.onload = function() {
|
|
if (frame.src === 'about:blank')
|
|
return true;
|
|
|
|
gc();
|
|
setTimeout(function () {
|
|
numberOfLiveDocumentsAfterIframeLoaded = internals.numberOfLiveDocuments();
|
|
debug("The iframe has finished loading.");
|
|
|
|
frame.remove();
|
|
frame = null;
|
|
|
|
gc();
|
|
setTimeout(function () {
|
|
debug("The iframe has been destroyed.");
|
|
shouldBe("internals.numberOfLiveDocuments()", "numberOfLiveDocumentsAfterIframeLoaded - 1");
|
|
debug("");
|
|
finishJSTest();
|
|
});
|
|
});
|
|
}
|
|
|
|
frame.src = 'resources/animation-leak-iframe.html';
|
|
}
|
|
|
|
</script>
|
|
<script src="../resources/js-test-post.js"></script>
|
|
</body>
|
|
</html> |