| <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| <html> |
| <head> |
| <title>This tests the case when the target node of the tap is a nested iframe with visibility hidden.</title> |
| <script src="../../../../resources/basic-gestures.js"></script> |
| <style> |
| #tapThis { |
| width: 400px; |
| height: 400px; |
| background-color: green; |
| } |
| |
| iframe { |
| position: absolute; |
| height: 300px; |
| width: 300px; |
| left: 0px; |
| top: 0px; |
| } |
| </style> |
| |
| <script> |
| async function test() { |
| if (!window.testRunner || !testRunner.runUIScript) |
| return; |
| |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| |
| await tapAtPoint(100, 100); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <div id=tapThis>PASS if 'clicked' text is shown below</div> |
| <iframe frameborder=0 id=visibleIframe srcdoc=" |
| <body> |
| <div id=nestedFrameDiv style='width: 280px; height: 280px; background-color: blue; opacity: 0.7;'></div> |
| <iframe frameborder=0 style='position: absolute; left: 0px; top: 0px; width: 200px; height: 200px; background-color: red; visibility: hidden'></iframe> |
| <script> |
| nestedFrameDiv.addEventListener('click', function( event ) { |
| window.parent.result.innerHTML = 'clicked'; |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| |
| }, false); |
| </script> |
| </body> |
| "></iframe> |
| <pre id=result></pre> |
| </body> |
| </html> |