diff options
author | Leon Clarke <leonclarke@google.com> | 2010-03-09 14:12:21 +0000 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-05-04 10:59:37 +0100 |
commit | f91ac8eab3399adb5325701bebe0590a77e49df7 (patch) | |
tree | 04ff055963cf2bfe147998ca3396134b243be38d /LayoutTests | |
parent | b97e8541004c77ec0c85f74b896b9d3bdb6de6b4 (diff) | |
download | external_webkit-f91ac8eab3399adb5325701bebe0590a77e49df7.zip external_webkit-f91ac8eab3399adb5325701bebe0590a77e49df7.tar.gz external_webkit-f91ac8eab3399adb5325701bebe0590a77e49df7.tar.bz2 |
Link prefetch support
http://b/issue?id=2268353
Diffstat (limited to 'LayoutTests')
8 files changed, 152 insertions, 0 deletions
diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement10-expected.txt b/LayoutTests/dom/html/level2/html/HTMLLinkElement10-expected.txt new file mode 100644 index 0000000..6f009e8 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement10-expected.txt @@ -0,0 +1,2 @@ +Test: http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement10 +Status: Success diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement10-link.file b/LayoutTests/dom/html/level2/html/HTMLLinkElement10-link.file new file mode 100644 index 0000000..4a94b89 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement10-link.file @@ -0,0 +1,12 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"> +<TITLE>NIST DOM HTML Test - LINK</TITLE> +<BODY> +<P> +This is the test link that's pre-fetched by the prefetch test. +</P> +</BODY> +</HTML> + diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement10.html b/LayoutTests/dom/html/level2/html/HTMLLinkElement10.html new file mode 100644 index 0000000..dcf20e1 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement10.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"> +<TITLE>NIST DOM HTML Test - LINK</TITLE> +<script charset='UTF-8' type='text/javascript' src='selfhtml.js'></script> +<script charset='UTF-8' type='text/javascript' src='HTMLLinkElement10.js'></script> +<LINK CHARSET="Latin-1" HREF="HTMLLinkElement10-link.file" HREFLANG="en" MEDIA="screen" REL="prefetch" TYPE="text/html" onload="prefetchComplete()"> +<LINK CHARSET="Latin-1" HREF="./files/style1.css" HREFLANG="en" MEDIA="screen" REV="stylesheet" TYPE="text/css"> +<script type='text/javascript'>startTest10(); +</script></HEAD> +<BODY onload="loadComplete()"> +<P> +<BR> +</P> +</BODY> +</HTML> + diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement10.js b/LayoutTests/dom/html/level2/html/HTMLLinkElement10.js new file mode 100644 index 0000000..c0ac4a7 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement10.js @@ -0,0 +1,51 @@ + + + /** + * Gets URI that identifies the test. + * @return uri identifier of test + */ +function getTargetURI() { + return "http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement10"; + } + +var docsLoaded = 0; +var mainLoaded = false; +var prefetchLoaded = false; + +function finishTest() { + if (mainLoaded && prefetchLoaded) { + setResult(null, null); + } else { + if (!prefetchLoaded) { + setResult("fail", "No prefetch onload fired"); + } else { + setResult("fail", "Prefetch fired, but maybe the document onload didn't"); + } + } + if (window.layoutTestController) { + layoutTestController.notifyDone(); + } +} + +function loadComplete() { + mainLoaded = true; + if (++docsLoaded == 2) { + finishTest(); + } +} + +function prefetchComplete() { + prefetchLoaded = true; + if (++docsLoaded == 2) { + finishTest(); + } +} + + + +function startTest10() { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } +} diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement11-expected.txt b/LayoutTests/dom/html/level2/html/HTMLLinkElement11-expected.txt new file mode 100644 index 0000000..d53710a --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement11-expected.txt @@ -0,0 +1,2 @@ +Test: http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement11 +Status: Success diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement11.css b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.css new file mode 100644 index 0000000..6a5dab8 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.css @@ -0,0 +1 @@ +div { font-family: Arial, Helvetica, sans-serif; color: red; } diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement11.html b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.html new file mode 100644 index 0000000..9b9a5e4 --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.html @@ -0,0 +1,15 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> +<HEAD> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"> +<TITLE>NIST DOM HTML Test - LINK</TITLE> +<script charset='UTF-8' type='text/javascript' src='selfhtml.js'></script> +<script charset='UTF-8' type='text/javascript' src='HTMLLinkElement11.js'></script><script type='text/javascript'>startTest11();</script></HEAD> +<LINK CHARSET="Latin-1" HREF="HTMLLinkElement11.css" HREFLANG="en" MEDIA="screen" REL="stylesheet" TYPE="text/css" onload="cssComplete()"> +<BODY onload="loadComplete()"> +<P> +<BR> +</P> +</BODY> +</HTML> + diff --git a/LayoutTests/dom/html/level2/html/HTMLLinkElement11.js b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.js new file mode 100644 index 0000000..b8bf1cb --- /dev/null +++ b/LayoutTests/dom/html/level2/html/HTMLLinkElement11.js @@ -0,0 +1,51 @@ + + + /** + * Gets URI that identifies the test. + * @return uri identifier of test + */ +function getTargetURI() { + return "http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement11"; + } + +var docsLoaded = 0; +var mainLoaded = false; +var cssLoaded = false; + +function finishTest() { + if (mainLoaded && cssLoaded) { + setResult(null, null); + } else { + if (!cssLoaded) { + setResult("fail", "No css onload fired"); + } else { + setResult("fail", "Css fired, but maybe the document onload didn't"); + } + } + if (window.layoutTestController) { + layoutTestController.notifyDone(); + } +} + +function loadComplete() { + mainLoaded = true; + if (++docsLoaded == 2) { + finishTest(); + } +} + +function cssComplete() { + cssLoaded = true; + if (++docsLoaded == 2) { + finishTest(); + } +} + + + +function startTest11() { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } +} |