| <!DOCTYPE html> |
| <html> |
| <head> |
| </head> |
| <body> |
| <p>This test ensures that the focus ring is not shown on the anchor after blurring and focusing the window.</p> |
| <a id="anchor" href="javascript:log('anchor was clicked')">Anchor</a> |
| <pre id="console"> |
| </pre> |
| |
| <script> |
| var anchor = document.getElementById('anchor'); |
| window.onfocus = function() { |
| log('window was focused'); |
| }; |
| window.onblur = function() { |
| log('window was blurred'); |
| }; |
| anchor.onfocus = function() { |
| log('anchor was focused'); |
| }; |
| anchor.onblur = function() { |
| log('anchor was blurred'); |
| }; |
| window.onload = function() { |
| if (window.eventSender) { |
| // Click the link. |
| eventSender.mouseMoveTo(anchor.offsetLeft + 2, anchor.offsetTop + 2); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| internals.setFocused(false); |
| internals.setFocused(true); |
| } |
| }; |
| |
| function log(message) { |
| var console = document.getElementById("console"); |
| console.textContent += message + '\n'; |
| } |
| </script> |
| </body> |
| </html> |