Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / layout / reftests / forms / select / focusring-2.html
blobe2656b2485c0adffc82656d42b85ad33b39ab814
1 <!DOCTYPE HTML>
2 <html class="reftest-wait"><head>
3 <meta charset="utf-8">
4 <title>Testcase #2 for bug 1253977</title>
5 <style type="text/css">
7 * { -moz-appearance:none; }
8 :focus {
9 border:2px solid black;
11 :-moz-focusring {
12 outline: 2px dashed black;
15 </style>
16 </head>
17 <body>
19 <select onfocus="continueTest1()" onblur="continueTest2()"><option>1<option>2</select>
21 <script>
23 function continueTest2(){
24 var s = document.querySelector("select");
25 setTimeout(function(){ s.style.display = 'inline'; document.body.offsetHeight; }, 4);
26 setTimeout(function(){ document.body.offsetHeight; document.documentElement.removeAttribute("class"); }, 100);
29 function continueTest1(){
30 var s = document.querySelector("select");
31 setTimeout(function(){ s.style.display = 'none'; }, 2);
32 setTimeout(function(){ s.blur(); document.body.offsetHeight; }, 3);
35 function runTests(){
36 var s = document.querySelector("select");
37 s.focus();
40 window.focus();
41 window.addEventListener("MozReftestInvalidate", runTests);
43 </script>
45 </body>
46 </html>