helper_hittest_float_bug1434846.html (1333B)
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 #float { 11 float: left; 12 } 13 #subframe { 14 overflow: scroll; 15 height: 300px; 16 } 17 #subframe-content { 18 width: 300px; 19 height: 2000px; 20 background: cyan; 21 } 22 #make-root-scrollable { 23 height: 5000px; 24 } 25 </style> 26 </head> 27 <body> 28 <div id="float"> 29 <div id="subframe"> 30 <div id="subframe-content"></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: { vertical: 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>