layout/html/tests/style/bugs/bug302186-10.html
author hg@mozilla.com
Thu, 22 Mar 2007 10:30:00 -0700
changeset 1 9b2a99adc05e53cd4010de512f50118594756650
permissions -rw-r--r--
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,

<!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>