| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <html> |
| <head> |
| |
| <style type="text/css"> |
| a { background-color: red; } |
| .pending { display: none; } |
| #link:visited { display: none; } |
| iframe { visibility: hidden; } |
| </style> |
| |
| <script type="text/javascript"> |
| |
| function test() |
| { |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| layoutTestController.keepWebHistory(); |
| } |
| |
| var subframeLocation = "resources/subframe.html?" + (new Date()).valueOf(); |
| |
| document.getElementById('link').setAttribute("href", subframeLocation); |
| |
| var frame = document.createElement("iframe"); |
| frame.setAttribute("name", subframeLocation); |
| frame.setAttribute("src", subframeLocation); |
| frame.setAttribute("onload", "frameLoaded()"); |
| document.getElementById("frameHolder").appendChild(frame); |
| } |
| |
| function frameLoaded() |
| { |
| document.getElementById('link').removeAttribute('class'); |
| |
| getComputedStyle(document.getElementById('link')); |
| |
| document.getElementById('loadedMessage').appendChild(document.createTextNode("Subframe loaded; test was able to run.")); |
| |
| if (window.layoutTestController) |
| layoutTestController.notifyDone(); |
| } |
| |
| </script> |
| |
| </head> |
| <body onload="test()"> |
| <p>There should be no red link displayed below.</p> |
| <p id="loadedMessage"></p> |
| <p><a id="link" class="pending">If you can see this link, the test failed.</a></p> |
| <p id="frameHolder"></p> |
| </body> |
| </html> |