blob: f8db5cb605eee672b3351d0906e27c4c4a1d32db [file] [log] [blame]
<!doctype html>
<html>
<head>
<style type="text/css">
div[test=before] + div + span {
color: red;
display: block;
}
div[test=before] + div + span + span {
display: none;
}
div[test=after] + div + span {
display: none;
}
div[test=after] + div + span + span {
color: green;
display: block;
}
</style>
</head>
<body onload="startTest();">
<div id="div1" test="before">Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=66887">https://bugs.webkit.org/show_bug.cgi?id=66887</a></div>
<div id="div2">Test Result:</div>
<span>FAILED</span>
<span>PASSED</span>
<script>
function change() {
var element = document.getElementById('div1');
element.attributes.test.value = "after";
if (window.layoutTestController) {
layoutTestController.notifyDone();
}
}
function startTest() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
// Trigger an attribute change after all load processing is done. Doing the change
// here immediately does not exhibit the problem.
setTimeout("change();", 0);
}
</script>
</body>
</html>