diff options
Diffstat (limited to 'LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html')
-rw-r--r-- | LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html new file mode 100644 index 0000000..6e24184 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/onload-completion-test.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<script text="text/javascript"> +function runtest() +{ +var nick=document.getElementById('nick'); +var row=document.getElementById('the_table').insertRow(-1); +var result=row.insertCell(0); +if (nick.naturalWidth == 320 && nick.naturalHeight == 240) + result.innerHTML = "SUCCESS."; +else + result.innerHTML = "FAILURE!"; +if (window.layoutTestController) + layoutTestController.dumpAsText(); +} +</script> +<body onload="runtest()"> +<p>This test verifies that at the time a body onload function is +called that the subresources of this page (in particular the image) +are already loaded. The page verifies that the image has the expected +dimensions at the time of the onload event, and prints its result +based on that. This is a regression test for a bug introduced by the +patch for bug 3652.</p> +<img id=nick src="resources/nick.jpg"> +<table id="the_table" border="1"> +<tr><td></td></tr> +</table> +</body> |