SVGImageCache isn't invalidated for <img> on dynamic page scale changes
[WebKit-https.git] / LayoutTests / svg / as-image / svg-image-leak-loader.html
1 <html>
2 <head>
3 <script>
4 if (window.layoutTestController) {
5     layoutTestController.dumpAsText();
6     layoutTestController.waitUntilDone();
7 }
8
9 function loaded() {
10     // Start a new resource load in the iframe.
11     // Before bug 55017 is resolved, the new resource load will be blocked
12     // because of the 20 leaked loaders caused by the svg images.
13     var iframe = document.createElement('iframe');
14     iframe.src = 'resources/load-script.html';
15     iframe.onload = function() {
16         document.getElementById('result').innerText = 'SUCCESS';
17         if (window.layoutTestController)
18             layoutTestController.notifyDone();
19     };
20     document.body.appendChild(iframe);
21 }
22 </script>
23 </head>
24
25 <body onload="loaded()">
26 This test checks if SVGIMages cause MainResourceLoaders leaks which will prevent later
27 sub-resources from being loaded.<br>
28 This test should produce "SUCCESS" and should not timeout.
29
30 <div id="result">FAIL</div>
31
32 <!--
33  ResourceLoadScheduler limits maximum 20 loading loaders at parsing stage for each host.
34  Before bug 55017 is resolved, the following svg images will leak their MainResourceLoaders.
35 -->
36 <img src='resources/circle.svg?1'>
37 <img src='resources/circle.svg?2'>
38 <img src='resources/circle.svg?3'>
39 <img src='resources/circle.svg?4'>
40 <img src='resources/circle.svg?5'>
41 <img src='resources/circle.svg?6'>
42 <img src='resources/circle.svg?7'>
43 <img src='resources/circle.svg?8'>
44 <img src='resources/circle.svg?9'>
45 <img src='resources/circle.svg?10'>
46 <img src='resources/circle.svg?11'>
47 <img src='resources/circle.svg?12'>
48 <img src='resources/circle.svg?13'>
49 <img src='resources/circle.svg?14'>
50 <img src='resources/circle.svg?15'>
51 <img src='resources/circle.svg?16'>
52 <img src='resources/circle.svg?17'>
53 <img src='resources/circle.svg?18'>
54 <img src='resources/circle.svg?19'>
55 <img src='resources/circle.svg?20'>
56 </body>
57 </html>