This test checks that a script focus when the user hasn't interacted with the page yet, always matches :focus-visible.

  1. If the element that says "Focused" has a red background then the test result is FAILURE, if it has a green outline then the test result is SUCCESS.

Your user-agent does not support :focus-visible pseudo-class, please SKIP this test.

Focused

Summary

Harness status: OK

Found 2 tests

Details

ResultTest NameMessage
Pass":focus-visible" should be a valid selector
Asserts run
Pass
assert_true(true, "\":focus-visible\" should not throw in querySelector")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:68:9)
Pass
assert_equals(0, 0, "Sheet should have no rule")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:76:9)
Pass
assert_equals(1, 1, "Sheet should have 1 rule")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:78:9)
Pass
assert_equals(":focus-visible", ":focus-visible", "serialization should be canonical")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:84:13)
Pass
assert_equals(0, 0, "Sheet should have no rule")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:87:9)
Pass
assert_equals(1, 1, "Sheet should have 1 rule")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:89:9)
Pass
assert_equals(":focus-visible", ":focus-visible", "serialization should round-trip")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:91:9)
Pass
assert_equals(true, true, "CSS.supports() reports the expected value")
    at Test.<anonymous> ( /css/support/parsing-testcommon.js:94:9)
PassScript focus without any previous user interaction matches :focus-visible
Asserts run
Pass
assert_equals("rgb(0, 128, 0)", "rgb(0, 128, 0)", "outlineColor for DIV#target should be green")
    at Test.<anonymous> ( /css/selectors/focus-visible-script-focus-001.html:48:7)
Pass
assert_not_equals("rgba(0, 0, 0, 0)", "rgb(255, 0, 0)", "backgroundColor for DIV#target should NOT be red")
    at Test.<anonymous> ( /css/selectors/focus-visible-script-focus-001.html:49:7)