gecko/layout/html/tests/style/bugs/bug302186-10.html

32 lines
961 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:default + span { color: green }
span.reverse { color: green }
:default + span.reverse { color: red }
input { display: none }
</style>
</head>
<body onload='var div1 = document.getElementById("div1");
var inputs = div1.getElementsByTagName("input");
var firstElement = div1.removeChild(inputs[0]);
var div2 = document.getElementById("div2");
inputs = div2.getElementsByTagName("input");
var secondElement = div2.removeChild(inputs[0]);
div1.insertBefore(secondElement, div1.firstChild);
div2.insertBefore(firstElement, div2.firstChild);
'>
<form>
<div id="div1">
<input type="submit" id="foo1"><span>There should be no red.</span>
</div>
<div id="div2">
<input type="submit" id="foo2"><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>