1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/315920-14.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <head> 1.7 + <style> 1.8 + label {color: red} 1.9 + input[checked]:checked:default ~ label {color: green} 1.10 + </style> 1.11 + </head> 1.12 + <body onload='var form = document.getElementById("form"); 1.13 + var input2 = document.createElement("input"); 1.14 + input2.setAttribute("type", "checkbox"); 1.15 + input2.setAttribute("id", "two"); 1.16 + input2.setAttribute("checked", "true"); 1.17 + form.insertBefore(input2, form.firstChild); 1.18 + var label2 = document.createElement("label"); 1.19 + label2.setAttribute("for", "two"); 1.20 + var text2 = document.createTextNode("Should be no red"); 1.21 + label2.appendChild(text2); 1.22 + form.insertBefore(label2, document.getElementById("one"));'> 1.23 + <form id="form"> 1.24 + <input type="checkbox" name="group1" id="one" value="1"/> 1.25 + <label for="one">Should be no red</label> 1.26 + </form> 1.27 + </body> 1.28 +</html>