Skip to content

Commit

Permalink
Bug 1528949 [wpt PR 15460] - HTML: window.focus() sans browsing conte…
Browse files Browse the repository at this point in the history
…xt, a=testonly

Automatic update from web-platform-tests
HTML: window.focus() sans browsing context

For whatwg/html#4377.
--

wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144
wpt-pr: 15460
  • Loading branch information
annevk authored and jgraham committed Mar 15, 2019
1 parent e5d2d25 commit 85c446f
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
async_test(t => {
const input = document.body.appendChild(document.createElement("input"));
input.onfocus = t.step_func(() => {
const frame = document.body.appendChild(document.createElement("iframe")),
frameW = frame.contentWindow;
frameW.onfocus = t.unreached_func();
frame.remove();
frameW.focus();
t.step_timeout(() => {
assert_equals(document.activeElement, input);
t.done();
}, 100);
});
input.focus();
});

0 comments on commit 85c446f

Please sign in to comment.