From 3685df50bb19344967da8195855bf649dba95700 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 4 Oct 2019 10:23:31 +0000 Subject: [PATCH] Bug 1528949 [wpt PR 15460] - HTML: window.focus() sans browsing context, a=testonly Automatic update from web-platform-tests HTML: window.focus() sans browsing context For https://github.com/whatwg/html/pull/4377. -- wpt-commits: 84a44957233c13fb21f5d97b06db1d89076fb144 wpt-pr: 15460 UltraBlame original commit: d3eedffa9545cd523e3632aac00c7336c056cbc6 --- .../the-window-object/focus.window.js | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 testing/web-platform/tests/html/browsers/the-window-object/focus.window.js diff --git a/testing/web-platform/tests/html/browsers/the-window-object/focus.window.js b/testing/web-platform/tests/html/browsers/the-window-object/focus.window.js new file mode 100644 index 0000000000000..0a906a1e372b6 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/the-window-object/focus.window.js @@ -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 +( +) +; +} +) +;