| <!DOCTYPE html> |
| |
| <script> |
| window.jsTestIsAsync = true; |
| </script> |
| <script src="../../../resources/js-test.js"></script> |
| |
| <style> |
| * { |
| margin: 0; |
| padding: 0; |
| } |
| |
| #host { |
| position: absolute; |
| top: 0; |
| left: 0; |
| } |
| </style> |
| |
| <div id="host">Example link</div> |
| |
| <script> |
| description("Links should be clickable even when their content is projected into them."); |
| |
| var host = document.getElementById("host"); |
| var shadow = host.createShadowRoot(); |
| shadow.innerHTML = '<a href="#link-clicked"><content></content></a>'; |
| |
| window.onload = function() { |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(0, 0); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| } |
| }; |
| |
| window.onhashchange = function() { |
| if (window.internals) |
| debug('Cursor Info: ' + internals.getCurrentCursorInfo()); |
| shouldBeEqualToString("window.location.hash", "#link-clicked"); |
| finishJSTest(); |
| }; |
| </script> |