cross-origin-subframe-masked-pointer-events-mixed.sub.html (1290B)
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: 320px; 17 height: 180px; 18 pointer-events: none; 19 background-color: rgba(0, 0, 255, 0.25); 20 } 21 22 .obscurer > * { 23 width: 160px; 24 height: 180px; 25 pointer-events: initial; 26 background-color: rgba(255, 0, 0, 0.25); 27 } 28 29 </style> 30 </head> 31 <body> 32 <div class="obscurer"> 33 <div></div> 34 </div> 35 <iframe src="http://{{hosts[][www1]}}:{{ports[http][0]}}/is-input-pending/resources/blank.html"></iframe> 36 <p>Ensure that a parent frame cannot can events on top of a cross-origin subframe masked by a div with `pointer-events: none` and a `pointer-events: initial` child.</p> 37 <script> 38 window.addEventListener('load', () => { 39 PendingInputUtils.testCannotAccessPendingInputAt(window, 180, 10, 'cannot detect cross-origin events in `pointer-events: none` region'); 40 }); 41 </script> 42 </body> 43 </html>