<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var count = 0;
function test() {
var img = document.getElementById('img');
document.body.replaceChild(img.cloneNode(), img);
if (++count < 10)
setTimeout(test, 0);
else if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload='test()'>
<p>This test checks if SVGImageCache leaks SVG image data as reported in
https://bugs.webkit.org/show_bug.cgi?id=87792. Its layout has no particular meaning.
The test will cause crash of debug version when leaks of SVG image data is detected.</p>
<p>Note: the code detects leaks of SVG image data on destruction of SVGImageCache,
which doesn't work on platforms that DumpRenderTree leaks the cache itself.</p>
<img id='img' src='resources/circle.svg'>
</body>
</html>