blob: 4442a20c8e56163451ada37cacc1b4b55b8f9039 [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
jsTestIsAsync = true;
if (window.testRunner)
testRunner.keepWebHistory();
function compareStyles()
{
var anchor = document.createElement("a");
anchor.href="http://madeup.site.com";
anchor.setAttribute("id", "one");
anchor.innerHTML = "One";
document.getElementById('enclosure').appendChild(anchor);
if (window.internals) {
firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one'));
secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two'));
shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', finishJSTest);
}
}
</script>
<style>
:link { color: inherit }
:visited { color: orange }
</style>
</head>
<body onload="compareStyles()">
<iframe src="resources/dummy.html" style="display:none"></iframe>
<p>These two links should be different colors (green and orange):</p>
<p style="color:green">
<a id="enclosure" href="resources/dummy.html"></a>
<a href="resources/dummy.html" id="two">Two</a>
</p>
<div id=console></div>
</body>
</html>