Skip to content

Commit

Permalink
Upstream to WPT Shadow DOM tests related to :focus pseudo-class
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=220907

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

These tests landed originally in r250788 (bug #202432).

* web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host-expected.txt: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt.
* web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html.
  Removed workaround to wait until :focus matches on "focus" event, as that has been fixed in r271146 (bug #220243).
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html.

LayoutTests:

* fast/shadow-dom/focus-pseudo-on-shadow-host-1-expected.html: Removed.
* fast/shadow-dom/focus-pseudo-on-shadow-host-2-expected.html: Removed.
* fast/shadow-dom/focus-pseudo-on-shadow-host-3-expected.html: Removed.
* platform/ios/TestExpectations: Mark the new exported tests as passing.


Canonical link: https://commits.webkit.org/233390@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mrego committed Jan 27, 2021
1 parent 3800af3 commit 7a63857
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 31 deletions.
12 changes: 12 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
2021-01-27 Manuel Rego Casasnovas <rego@igalia.com>

Upstream to WPT Shadow DOM tests related to :focus pseudo-class
https://bugs.webkit.org/show_bug.cgi?id=220907

Reviewed by Ryosuke Niwa.

* fast/shadow-dom/focus-pseudo-on-shadow-host-1-expected.html: Removed.
* fast/shadow-dom/focus-pseudo-on-shadow-host-2-expected.html: Removed.
* fast/shadow-dom/focus-pseudo-on-shadow-host-3-expected.html: Removed.
* platform/ios/TestExpectations: Mark the new exported tests as passing.

2021-01-27 Imanol Fernandez <ifernandez@igalia.com>

Complete WebXRRigidTransform implementation
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 19 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
@@ -1,3 +1,22 @@
2021-01-27 Manuel Rego Casasnovas <rego@igalia.com>

Upstream to WPT Shadow DOM tests related to :focus pseudo-class
https://bugs.webkit.org/show_bug.cgi?id=220907

Reviewed by Ryosuke Niwa.

These tests landed originally in r250788 (bug #202432).

* web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host-expected.txt: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt.
* web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html.
Removed workaround to wait until :focus matches on "focus" event, as that has been fixed in r271146 (bug #220243).
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3-expected.xht: Added.
* web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html: Renamed from LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html.

2021-01-27 Imanol Fernandez <ifernandez@igalia.com>

Complete WebXRRigidTransform implementation
Expand Down
Expand Up @@ -4,8 +4,9 @@
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content=":focus should match a shadow host which contains the focused element">
<link rel="help" href="https://html.spec.whatwg.org/#element-has-the-focus">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<link rel="help=" href="https://bugs.webkit.org/show_bug.cgi?id=202432">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<input id="defaultFocus" autofocus>
Expand All @@ -16,11 +17,8 @@
let focusedDefault = false;
function didFocusDefault() { }
function checkFocusMatch() {
if (defaultFocus.matches(':focus')) {
focusedDefault = true;
didFocusDefault();
} else
setTimeout(checkFocusMatch, 100);
focusedDefault = true;
didFocusDefault();
}
defaultFocus.addEventListener('focus', checkFocusMatch);

Expand Down
@@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
background-color: green;
height: 100px;
width: 100px;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div></div>
</body>
</html>
Expand Up @@ -4,9 +4,11 @@
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content=":focus should match a shadow host which contains the focused element">
<link rel="help" href="https://html.spec.whatwg.org/#element-has-the-focus">
<link rel="help=" href="https://bugs.webkit.org/show_bug.cgi?id=202432">
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
</head>
<body>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="host"></div>
<style>
#host { background: red; width: 100px; height: 100px; }
Expand Down
@@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
background-color: green;
height: 100px;
width: 100px;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div></div>
</body>
</html>
Expand Up @@ -4,9 +4,11 @@
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content=":focus should match a shadow host which contains the focused element">
<link rel="help" href="https://html.spec.whatwg.org/#element-has-the-focus">
<link rel="help=" href="https://bugs.webkit.org/show_bug.cgi?id=202432">
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
</head>
<body>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="host"><span>FAIL</span></div>
<style>
#host { background: green; width: 100px; height: 100px; }
Expand Down
@@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<style type="text/css"><![CDATA[
div
{
background-color: green;
height: 100px;
width: 100px;
}
]]></style>
</head>
<body>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div></div>
</body>
</html>
Expand Up @@ -4,9 +4,11 @@
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
<meta name="assert" content=":focus should not match a shadow host if the focused element is a slotted content">
<link rel="help" href="https://html.spec.whatwg.org/#element-has-the-focus">
<link rel="help=" href="https://bugs.webkit.org/show_bug.cgi?id=202432">
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
</head>
<body>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="host"><div id="target" tabindex="0"></div></div>
<style>
#host { background: green; width: 100px; height: 100px; }
Expand Down
4 changes: 4 additions & 0 deletions LayoutTests/platform/ios/TestExpectations
Expand Up @@ -808,6 +808,10 @@ webkit.org/b/164888 fast/shadow-dom/focus-navigation-out-of-slot.html [ Skip ]
webkit.org/b/164888 fast/shadow-dom/focus-navigation-passes-shadow-host.html [ Skip ]
webkit.org/b/164888 fast/shadow-dom/focus-navigation-passes-svg-use-element.html [ Skip ]
webkit.org/b/202497 imported/w3c/web-platform-tests/shadow-dom/focus/ [ Skip ]
imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html [ Pass ]
imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html [ Pass ]
imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html [ Pass ]
imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html [ Pass ]

# This test needs to be rewritten to use runUIScript to work on iOS
webkit.org/b/152993 http/tests/contentdispositionattachmentsandbox/form-submission-disabled.html [ Skip ]
Expand Down

0 comments on commit 7a63857

Please sign in to comment.