cross-origin-subframe-masked-pointer-events-mixed-2.sub.html (1424B)
1 <!doctype html> 2 <html> 3 <head> 4 <script src="/resources/testdriver.js"></script> 5 <script src="/resources/testdriver-actions.js"></script> 6 <script src="/resources/testdriver-vendor.js"></script> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="../resources/input-onmessage.js"></script> 10 <script src="../resources/pending-input-utils.js"></script> 11 <style> 12 .obscurer { 13 position: fixed; 14 top: 0px; 15 left: 0px; 16 width: 160px; 17 height: 180px; 18 background-color: rgba(0, 0, 255, 0.25); 19 } 20 21 .obscurer > * { 22 position: absolute; 23 left: 160px; 24 width: 160px; 25 height: 90px; 26 pointer-events: none; 27 background-color: rgba(255, 0, 0, 0.25); 28 } 29 30 </style> 31 </head> 32 <body> 33 <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe> 34 <div class="obscurer"> 35 <div></div> 36 </div> 37 <p>Ensure that a parent frame cannot detect events on top of a cross-origin subframe masked by a div with a `pointer-events: none` child.</p> 38 <script> 39 window.addEventListener('load', () => { 40 PendingInputUtils.testCannotAccessPendingInputAt(window, 180, 120, 'parent cannot detect cross-origin events in `pointer-events: none` region'); 41 PendingInputUtils.testCannotAccessPendingInputAt(frames[0], 10, 10, 'subframe cannot detect events in `pointer-events: initial` region'); 42 }); 43 </script> 44 </body> 45 </html>