summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/image-prefetch-stress.html
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/manual-tests/image-prefetch-stress.html')
-rw-r--r--Source/WebCore/manual-tests/image-prefetch-stress.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/image-prefetch-stress.html b/Source/WebCore/manual-tests/image-prefetch-stress.html
new file mode 100644
index 0000000..b9203b7
--- /dev/null
+++ b/Source/WebCore/manual-tests/image-prefetch-stress.html
@@ -0,0 +1,20 @@
+<html>
+<script type="text/javascript">
+(function(){
+ var i = 0;
+setInterval(function(){
+ var x = new Image();
+ x.src = "http://upload.wikimedia.org/wikipedia/commons/e/e9/Sombrero_Galaxy_in_infrared_light_%28Hubble_Space_Telescope_and_Spitzer_Space_Telescope%29.jpg?" + i;
+ i++;
+ }, 500);
+})()
+</script>
+<body>
+When an image is preloaded in javascript, the size of the image is never
+reported to the javascript garbage collector. If a large image is repeatedly
+preloaded but never used, it will not free any of the images until the
+garbage collector has run out of space to allocate any new free javascript
+variables. This test passes if after a certain point, the number of allocated
+images as reported by the caches window stops growing.
+</body>
+</html>