Bug 1528949 [wpt PR 15460] - HTML: window.focus() sans browsing context, a=testonly
☠☠ backed out by 66b1aba3fb43 ☠ ☠
authorAnne van Kesteren <annevk@annevk.nl>
Wed, 06 Mar 2019 12:35:01 +0000
changeset 522274 4e667891d3088a94002b74336f2a6ab7933d0d21
parent 522273 5ca434eafe2f1b96369ddc6c6585ae998e5d3240
child 522275 2f41234f6509a10f9ff8438bde2ec7b28f98cb76
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1528949, 15460
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
testing/web-platform/tests/html/browsers/the-window-object/focus.window.js
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/the-window-object/focus.window.js
@@ -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();
+});