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