Title: [287469] trunk/LayoutTests
Revision
287469
Author
[email protected]
Date
2021-12-28 04:28:33 -0800 (Tue, 28 Dec 2021)

Log Message

[selectors] Import two :focus-visible tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=234720

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

The tests were added in https://github.com/web-platform-tests/wpt/pull/32000
and are related to :focus-visible and accesskey.
They don't work on WebKit due to webkit.org/b/234139, though they work properly on wpt.fyi.

* web-platform-tests/css/selectors/focus-visible-024.html: Added.
* web-platform-tests/css/selectors/focus-visible-025.html: Added.
* web-platform-tests/css/selectors/w3c-import.log:

LayoutTests:

Skip the new imported tests as they fail due to webkit.org/b/234139.

* TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (287468 => 287469)


--- trunk/LayoutTests/ChangeLog	2021-12-28 10:14:42 UTC (rev 287468)
+++ trunk/LayoutTests/ChangeLog	2021-12-28 12:28:33 UTC (rev 287469)
@@ -1,3 +1,14 @@
+2021-12-28  Manuel Rego Casasnovas  <[email protected]>
+
+        [selectors] Import two :focus-visible tests from WPT
+        https://bugs.webkit.org/show_bug.cgi?id=234720
+
+        Reviewed by Sergio Villar Senin.
+
+        Skip the new imported tests as they fail due to webkit.org/b/234139.
+
+        * TestExpectations:
+
 2021-12-27  Arcady Goldmints-Orlov  <[email protected]>
 
         [GLIB] Update test expectations and baselines. Unreviewed test gardening.

Modified: trunk/LayoutTests/TestExpectations (287468 => 287469)


--- trunk/LayoutTests/TestExpectations	2021-12-28 10:14:42 UTC (rev 287468)
+++ trunk/LayoutTests/TestExpectations	2021-12-28 12:28:33 UTC (rev 287469)
@@ -1456,6 +1456,8 @@
 webkit.org/b/185859 imported/w3c/web-platform-tests/css/selectors/focus-visible-002.html [ Skip ]
 webkit.org/b/185859 imported/w3c/web-platform-tests/css/selectors/focus-visible-003.html [ Skip ]
 webkit.org/b/185859 imported/w3c/web-platform-tests/css/selectors/focus-visible-004.html [ Skip ]
+webkit.org/b/234139 imported/w3c/web-platform-tests/css/selectors/focus-visible-024.html [ Skip ]
+webkit.org/b/234139 imported/w3c/web-platform-tests/css/selectors/focus-visible-025.html [ Skip ]
 webkit.org/b/217904 imported/w3c/web-platform-tests/css/selectors/is-where-visited.html [ ImageOnlyFailure ]
 webkit.org/b/64861 imported/w3c/web-platform-tests/css/selectors/selectors-dir-selector-auto-direction-change-001.html [ ImageOnlyFailure ]
 webkit.org/b/64861 imported/w3c/web-platform-tests/css/selectors/selectors-dir-selector-change-001.html [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287468 => 287469)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-12-28 10:14:42 UTC (rev 287468)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-12-28 12:28:33 UTC (rev 287469)
@@ -1,3 +1,18 @@
+2021-12-28  Manuel Rego Casasnovas  <[email protected]>
+
+        [selectors] Import two :focus-visible tests from WPT
+        https://bugs.webkit.org/show_bug.cgi?id=234720
+
+        Reviewed by Sergio Villar Senin.
+
+        The tests were added in https://github.com/web-platform-tests/wpt/pull/32000
+        and are related to :focus-visible and accesskey.
+        They don't work on WebKit due to webkit.org/b/234139, though they work properly on wpt.fyi.
+
+        * web-platform-tests/css/selectors/focus-visible-024.html: Added.
+        * web-platform-tests/css/selectors/focus-visible-025.html: Added.
+        * web-platform-tests/css/selectors/w3c-import.log:
+
 2021-12-26  Antti Koivisto  <[email protected]>
 
         [:has() pseudo-class] Support :disabled and :enabled pseudo-class invalidation

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-024.html (0 => 287469)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-024.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-024.html	2021-12-28 12:28:33 UTC (rev 287469)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>CSS Test (Selectors): Element matches :focus-visiblel after accesskey</title>
+<link rel="author" title="Manuel Rego Casasnovas" href=""
+<link rel="help" href="" />
+<meta name="assert" content="This test checks that :focus-visible matches after focusing an element using accesskey.">
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<style>
+  :focus-visible {
+    outline: green solid 5px;
+  }
+</style>
+
+<div id="targetA" tabindex="0" accesskey="a">Target A</div>
+<button id="targetB" tabindex="0" accesskey="b">Target B</button>
+<script>
+  // Check that :focus-visible is supported.
+  test_valid_selector(':focus-visible');
+
+  promise_test(async t => {
+    await pressAccessKey("a");
+    assert_equals(getComputedStyle(targetA).outlineStyle, "solid", `outline-style for ${targetA.tagName}#${targetA.id} should be solid`);
+    assert_equals(getComputedStyle(targetA).outlineColor, "rgb(0, 128, 0)", `outlineColor for ${targetA.tagName}#${targetA.id} should be green`);
+    t.done();
+  }, ":focus-visible matches after accesskey on DIV");
+
+  promise_test(async t => {
+    await pressAccessKey("b");
+    assert_equals(getComputedStyle(targetB).outlineStyle, "solid", `outline-style for ${targetB.tagName}#${targetB.id} should be solid`);
+    assert_equals(getComputedStyle(targetB).outlineColor, "rgb(0, 128, 0)", `outlineColor for ${targetB.tagName}#${targetB.id} should be green`);
+    t.done();
+  }, ":focus-visible matches after accesskey on BUTTON");
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-025.html (0 => 287469)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-025.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-025.html	2021-12-28 12:28:33 UTC (rev 287469)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>CSS Test (Selectors): Element matches :focus-visiblel after accesskey after previous mouse focus</title>
+<link rel="author" title="Manuel Rego Casasnovas" href=""
+<link rel="help" href="" />
+<meta name="assert" content="This test checks that :focus-visible matches after focusing an element using accesskey, even when previously another element has been focused by mouse click.">
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<style>
+  :focus-visible {
+    outline: green solid 5px;
+  }
+</style>
+
+<div id="initial" tabindex="0">Initial</div>
+<div id="targetA" tabindex="0" accesskey="a">Target A</div>
+<button id="targetB" tabindex="0" accesskey="b">Target B</button>
+<script>
+  // Check that :focus-visible is supported.
+  test_valid_selector(':focus-visible');
+
+  promise_test(async t => {
+    await test_driver.click(initial);
+    assert_equals(getComputedStyle(initial).outlineStyle, "none", `outline-style for ${initial.tagName}#${initial.id} should be none`);
+
+    await pressAccessKey("a");
+    assert_equals(getComputedStyle(targetA).outlineStyle, "solid", `outline-style for ${targetA.tagName}#${targetA.id} should be solid`);
+    assert_equals(getComputedStyle(targetA).outlineColor, "rgb(0, 128, 0)", `outlineColor for ${targetA.tagName}#${targetA.id} should be green`);
+    t.done();
+  }, ":focus-visible matches after accesskey on DIV after previous mouse focus");
+
+  promise_test(async t => {
+    await test_driver.click(initial);
+    assert_equals(getComputedStyle(initial).outlineStyle, "none", `outline-style for ${initial.tagName}#${initial.id} should be none`);
+
+    await pressAccessKey("b");
+    assert_equals(getComputedStyle(targetB).outlineStyle, "solid", `outline-style for ${targetB.tagName}#${targetB.id} should be solid`);
+    assert_equals(getComputedStyle(targetB).outlineColor, "rgb(0, 128, 0)", `outlineColor for ${targetB.tagName}#${targetB.id} should be green`);
+    t.done();
+  }, ":focus-visible matches after accesskey on BUTTON after previous mouse focus");
+</script>
+

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/w3c-import.log (287468 => 287469)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/w3c-import.log	2021-12-28 10:14:42 UTC (rev 287468)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/w3c-import.log	2021-12-28 12:28:33 UTC (rev 287469)
@@ -56,6 +56,9 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-020.html
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-021.html
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-022.tentative.html
+/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-023.html
+/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-024.html
+/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-025.html
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-002.tentative.html
 /LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-script-focus-003.tentative.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to