3 <link rel=
"stylesheet" href=
"resources/detached-style.css" type=
"text/css" media=
"screen">
5 <body onload=
"finishTest()">
6 <p><a href=
"https://bugs.webkit.org/show_bug.cgi?id=45205">Bug
45205</a>:
7 Test that
<link
> elements only have stylesheets when in document.
</p>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 head
= document
.getElementsByTagName("head")[0];
14 link
= document
.getElementsByTagName("link")[0];
15 result
= document
.getElementById("result");
17 head
.removeChild(link
);
21 result
.innerHTML
+= "Not in document: " + ((link
.sheet
=== null) ? "PASS" : ("FAIL: " + link
.sheet
)) + "\n";
23 head
.appendChild(link
);
25 result
.innerHTML
+= "After adding to document: " + ((link
.sheet
=== null) ? ("FAIL: " + link
.sheet
) : "PASS") + "\n";
27 result
.innerHTML
+= "DONE";