| <?xml-stylesheet href="resources/detached-style.css" media="screen"?> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <title/> |
| </head> |
| <body onload="finishTest()"> |
| <p><a href="https://bugs.webkit.org/show_bug.cgi?id=45205">Bug 45205</a>: |
| Test that <xml-stylesheet> processing instructions only have stylesheets when in document.</p> |
| <pre id="result"></pre> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| sheet = document.styleSheets[0]; |
| pi = document.firstChild; |
| result = document.getElementById("result"); |
| |
| document.removeChild(pi); |
| |
| function finishTest() |
| { |
| result.innerHTML += "Not in document: " + ((pi.sheet === null) ? "PASS" : ("FAIL: " + pi.sheet)) + "\n"; |
| |
| document.appendChild(pi); |
| |
| // This subtest fails in Firefox 4.0b8 - apparently, adding a processing instruction doens't trigger load. |
| result.innerHTML += "After adding to document: " + ((pi.sheet === null) ? ("FAIL: " + pi.sheet) : "PASS") + "\n"; |
| |
| result.innerHTML += "DONE"; |
| } |
| |
| </script> |
| </body> |
| </html> |