1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/css-invalid/input/input-radio-focus-click.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <body class="reftest-wait"> 1.7 + <!-- See bug 658282. --> 1.8 + <link rel='stylesheet' type='text/css' href='style.css'> 1.9 + <script> 1.10 + function loadHandler() { 1.11 + var button = document.getElementsByTagName('button')[0]; 1.12 + var radios = document.getElementsByName('foo'); 1.13 + 1.14 + button.onclick = function() { 1.15 + for (var i = 0; i < radios.length; i++) { 1.16 + radios[i].checked = false; 1.17 + } 1.18 + button.parentNode.removeChild(button); 1.19 + document.documentElement.className=''; 1.20 + }; 1.21 + 1.22 + radios[0].focus(); 1.23 + radios[0].checked = true; 1.24 + button.focus(); 1.25 + button.click(); 1.26 + } 1.27 + </script> 1.28 + <body onload="loadHandler();"> 1.29 + <input class='invalid' id='i1' name='foo' type='radio' required> 1.30 + <input class='invalid' id='i2' name='foo' type='radio' required> 1.31 + <button></button> 1.32 + </body> 1.33 +</html>