| activeTag = document.querySelector('iframe').contentWindow.document.activeElement.tagName; |
| if (activeTag == "INPUT") |
| console.log("FAIL: The input element is focused."); |
| console.log("PASS: The input element is not focused."); |
| <p>This test passes if the input element in the sandboxed frame is not |
| automatically focused upon, as it should be blocked by the sandboxed |
| scripts flag. A console warning to that effect should also be present.</p> |
| <iframe sandbox="allow-same-origin" |
| srcdoc="<input autofocus onfocus>"></iframe> |