helper_disallow_doubletap_zoom_inside_oopif.html (1491B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="user-scalable=no"/> 6 <title>Check that double tapping inside an oop iframe doesn't work if the top 7 level content document doesn't allow zooming</title> 8 <script src="apz_test_native_event_utils.js"></script> 9 <script src="apz_test_utils.js"></script> 10 <script src="/tests/SimpleTest/paint_listener.js"></script> 11 <script> 12 13 async function test() { 14 let useTouchpad = (location.search == "?touchpad"); 15 16 let resolution = await getResolution(); 17 ok(resolution > 0, 18 "The initial_resolution is " + resolution + ", which is some sane value"); 19 20 // Set up a Promise waiting for a TransformEnd which should never happen. 21 promiseTransformEnd().then(() => { 22 ok(false, "No TransformEnd should happen!"); 23 }); 24 25 // A double tap inside the OOP iframe. 26 await synthesizeDoubleTap(document.getElementById("target"), 20, 20, useTouchpad); 27 28 for (let i = 0; i < 10; i++) { 29 await promiseFrame(); 30 } 31 32 // Flush state just in case. 33 await promiseApzFlushedRepaints(); 34 35 let prev_resolution = resolution; 36 resolution = await getResolution(); 37 is(resolution, prev_resolution, "No zoom should happen"); 38 } 39 40 waitUntilApzStable() 41 .then(test) 42 .then(subtestDone, subtestFailed); 43 44 </script> 45 <style> 46 iframe { 47 margin: 0; 48 padding: 0; 49 border: 1px solid black; 50 } 51 </style> 52 </head> 53 <body> 54 55 <iframe id="target" width="100" height="100" src="http://example.org/"></iframe> 56 57 </body> 58 </html>