helper_hittest_float_bug1443518.html (1353B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>APZ hit-testing with floated subframe</title> 5 <script type="application/javascript" src="apz_test_utils.js"></script> 6 <script type="application/javascript" src="apz_test_native_event_utils.js"></script> 7 <script src="/tests/SimpleTest/paint_listener.js"></script> 8 <meta name="viewport" content="width=device-width"/> 9 <style> 10 #div1 { 11 position: relative; 12 } 13 #div2 { 14 width: 300px; 15 float: left; 16 } 17 #subframe { 18 overflow: auto; 19 } 20 #make-root-scrollable { 21 height: 5000px; 22 } 23 </style> 24 </head> 25 <body> 26 <div id="div1"> 27 <div id="div2"> 28 <div id="subframe"> 29 <pre>A line of text that overflows because it's sufficiently long</pre> 30 </div> 31 </div> 32 </div> 33 <div id="make-root-scrollable"></div> 34 </body> 35 <script type="application/javascript"> 36 37 async function test() { 38 var utils = getHitTestConfig().utils; 39 40 hitTestScrollbar({ 41 element: document.getElementById("subframe"), 42 directions: { horizontal: true }, 43 expectedScrollId: utils.getViewId(document.scrollingElement), 44 expectedLayersId: utils.getLayersId(), 45 trackLocation: ScrollbarTrackLocation.START, 46 expectThumb: true, 47 layerState: LayerState.INACTIVE, 48 }); 49 } 50 51 waitUntilApzStable() 52 .then(test) 53 .then(subtestDone, subtestFailed); 54 55 </script> 56 </html>