1081072-1.html (1576B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <!-- NOTE: This bug was triggered by scrollbar opacity-fading, so this 5 testcase needs to be loaded with this pref... 6 layout.testing.overlay-scrollbars.always-visible 7 ...set to *false* in order to have a chance to trigger the bug. 8 9 We don't have to worry about this producing any screenshots of 10 unpredictable partially-faded-scrollbars in our reftest snapshot, 11 because our scrollbars don't actually paint here, since the 12 scrollable element has "overflow:auto" and doesn't overflow 13 (because it's auto-sized to fit its content). --> 14 <style> 15 .container { 16 display: flex; 17 overflow-y: auto; 18 border: 1px solid black; 19 } 20 </style> 21 <script type='text/javascript'> 22 window.addEventListener("MozReftestInvalidate", startTest); 23 24 function startTest() { 25 // NOTE: setTimeout in tests is evil, but it's necessary here -- we need 26 // to wait until the scrollbars have finished fading, and there's no 27 // event we can listen for to signal that, AFAIK. Fortunately, there 28 // shouldn't be *visible* scrollbars in this testcase, so even if our 29 // setTimeout fires too early/late, the test will still pass. (So, there 30 // shouldn't be spurious failures; any failures that happen will be real.) 31 setTimeout(endTest, 800); 32 } 33 34 function endTest() { 35 document.documentElement.removeAttribute("class"); 36 } 37 </script> 38 </head> 39 <body> 40 <div class="container"> 41 <div>T</div> 42 </div> 43 </body> 44 </html>