From c86f08bc81892a44c2eb80344d6e3c651b71b80b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 27 Jul 2022 17:41:55 -0700 Subject: [PATCH] Fix a bug in this test that the host wasn't getting focused. (#35257) HTML defines steps to run when an element is inserted into a document (i.e. document tree), not anytime an element is connected to a document: https://html.spec.whatwg.org/multipage/interaction.html#the-autofocus-attribute --- css/selectors/focus-visible-020.html | 1 + 1 file changed, 1 insertion(+) diff --git a/css/selectors/focus-visible-020.html b/css/selectors/focus-visible-020.html index a8dadb5ed913b9..f021938d3becfc 100644 --- a/css/selectors/focus-visible-020.html +++ b/css/selectors/focus-visible-020.html @@ -45,6 +45,7 @@ test_valid_selector(':focus-visible'); async_test((t) => { + host.focus(); window.requestAnimationFrame(t.step_func_done(() => { assert_not_equals(getComputedStyle(host).backgroundColor, "rgb(255, 0, 0)", `backgroundColor for ${host.tagName}#${host.id} should NOT be red`);