-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1528949 [wpt PR 15460] - HTML: window.focus() sans browsing conte…
…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 UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6
- Loading branch information
Showing
1 changed file
with
123 additions
and
0 deletions.
There are no files selected for viewing
123 changes: 123 additions & 0 deletions
123
testing/web-platform/tests/html/browsers/the-window-object/focus.window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
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 | ||
( | ||
) | ||
; | ||
} | ||
) | ||
; |