diff options
Diffstat (limited to 'LayoutTests/fast/dom/HTMLLinkElement')
-rw-r--r-- | LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt | 3 | ||||
-rw-r--r-- | LayoutTests/fast/dom/HTMLLinkElement/subresource.html | 20 |
2 files changed, 23 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt b/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt new file mode 100644 index 0000000..b65bfe2 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/subresource-expected.txt @@ -0,0 +1,3 @@ +prefetch.link has MIME type application/octet-stream +PASS onload called! +This test will only print "PASS" or "FAIL" if link prefetches are enabled, otherwise it will show nothing below. diff --git a/LayoutTests/fast/dom/HTMLLinkElement/subresource.html b/LayoutTests/fast/dom/HTMLLinkElement/subresource.html new file mode 100644 index 0000000..0477e03 --- /dev/null +++ b/LayoutTests/fast/dom/HTMLLinkElement/subresource.html @@ -0,0 +1,20 @@ +<body> +<div id="console"></div> +<script src="../../js/resources/js-test-pre.js"></script> +<script> +function prefetch_onload() { + testPassed('onload called!'); + layoutTestController.notifyDone(); +} +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); + layoutTestController.dumpAsText(); + layoutTestController.dumpResourceResponseMIMETypes(); +} +</script> +<html> +<p>This test will only print "PASS" or "FAIL" if link prefetches are +enabled, otherwise it will show nothing below.</p> +<link href="prefetch.link" rel="prefetch" onload="prefetch_onload()" onerror="testFailed('onerror')" /> +</html> + |