blob: 6d7a5bff3153dcce85a10d4eb2ad717e54b06cad [file] [log] [blame]
<html>
<head>
<script>
if (window.layoutTestController) {
window.layoutTestController.keepWebHistory();
window.layoutTestController.dumpAsText();
}
function compareStyles()
{
if (window.layoutTestController) {
var firstStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('one'));
var secondStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('two'));
if (firstStyle.color == secondStyle.color || firstStyle.backgroundColor == secondStyle.backgroundColor) {
document.getElementById('result').innerHTML = 'FAIL';
return;
}
}
var firstStyle = window.getComputedStyle(document.getElementById('one'), "");
var secondStyle = window.getComputedStyle(document.getElementById('two'), "");
if (firstStyle.color != secondStyle.color || firstStyle.backgroundColor != secondStyle.backgroundColor) {
document.getElementById('result').innerHTML = 'FAIL';
return;
}
}
</script>
<style>
:link { color: green; background-color: white }
:visited { color: orange; background-color: black }
</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>
<a href="http://madeup.site.com" id="one">One</a>
<a href="resources/dummy.html" id="two">Two</a><br>
</p>
<p id=result>
PASS
</p>
</body>
</html>