helper_touch_action_zero_opacity_bug1500864.html (1524B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width; initial-scale=1.0"> 6 <title>Touch-action on a zero-opacity element</title> 7 <script type="application/javascript" src="apz_test_native_event_utils.js"></script> 8 <script type="application/javascript" src="apz_test_utils.js"></script> 9 <script src="/tests/SimpleTest/paint_listener.js"></script> 10 <script type="application/javascript"> 11 async function test() { 12 var target = document.getElementById("target"); 13 14 let touchEndPromise = promiseTouchEnd(document.body); 15 16 // drag the page up to scroll down by 50px 17 ok(await synthesizeNativeTouchDrag(target, 10, 100, 0, -50), 18 "Synthesized native vertical drag, waiting for touch-end event..."); 19 await touchEndPromise; 20 21 await promiseOnlyApzControllerFlushed(); 22 23 is(window.scrollX, 0, "X scroll offset didn't change"); 24 is(window.scrollY, 0, "Y scroll offset didn't change"); 25 } 26 27 waitUntilApzStable() 28 .then(test) 29 .then(subtestDone, subtestFailed); 30 31 </script> 32 </head> 33 <body style="border: solid 1px green"> 34 <div id="spacer" style="height: 2000px"> 35 Inside the black border is a zero-opacity touch-action none. 36 <div id="border" style="border: solid 1px black"> 37 <div style="opacity: 0; height: 300px;"> 38 <div style="transform:translate(0px)"> 39 <div id="target" style="height: 300px; touch-action: none">this text shouldn't be visible</div> 40 </div> 41 </div> 42 </div> 43 </div> 44 </body> 45 </html>