| <!DOCTYPE html> |
| <style> |
| iframe { |
| position: absolute; |
| top: 50px; |
| width: 100px; |
| height: 100px; |
| border: 1px solid black; |
| } |
| ::-webkit-scrollbar { |
| width: 0px; |
| } |
| </style> |
| <iframe src='http://127.0.0.1:8000/navigation/resources/focus-shifting-frame-with-anchor.html'></iframe> |
| <script> |
| if (window.testRunner) { |
| testRunner.waitUntilDone(); |
| } |
| onload = function() { |
| if (window.eventSender) { |
| // Give the frame user gesture to make sure 'focus' API works. |
| const iframe = document.querySelector("iframe"); |
| window.eventSender.mouseMoveTo(iframe.offsetLeft + 10, iframe.offsetTop + 10); |
| window.eventSender.mouseDown(); |
| window.eventSender.mouseUp(); |
| } |
| requestAnimationFrame(function() { |
| if (window.testRunner) { |
| testRunner.notifyDone(); |
| } |
| }); |
| }; |
| </script> |