Diff
Modified: trunk/LayoutTests/ChangeLog (271943 => 271944)
--- trunk/LayoutTests/ChangeLog 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/ChangeLog 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,3 +1,15 @@
+2021-01-27 Manuel Rego Casasnovas <[email protected]>
+
+ 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 <[email protected]>
Complete WebXRRigidTransform implementation
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,9 +0,0 @@
-
-
-PASS :focus must not match a shadow host with open mode shadow root that does not contain the focused element
-PASS :focus must match a shadow host with open mode shadow root that contains the focused element
-PASS :focus must not match a shadow host with open mode shadow root contains the focused element assigned to a slot
-PASS :focus must not match a shadow host with closed mode shadow root that does not contain the focused element
-PASS :focus must match a shadow host with closed mode shadow root that contains the focused element
-PASS :focus must not match a shadow host with closed mode shadow root contains the focused element assigned to a slot
-
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content=":focus should match a shadow host which contains the focused element">
-<link rel="help" href=""
-<script src=""
-<script src=""
-</head>
-<body>
-<input id="defaultFocus" autofocus>
-<div id="log"></div>
-<div id="container"></div>
-<script>
-
-let focusedDefault = false;
-function didFocusDefault() { }
-function checkFocusMatch() {
- if (defaultFocus.matches(':focus')) {
- focusedDefault = true;
- didFocusDefault();
- } else
- setTimeout(checkFocusMatch, 100);
-}
-defaultFocus.addEventListener('focus', checkFocusMatch);
-
-function prepare(test)
-{
- test.add_cleanup(() => {
- defaultFocus.focus();
- container.textContent = '';
- });
- return new Promise((resolve) => {
- if (focusedDefault)
- resolve();
- else
- didFocusDefault = resolve;
- });
-}
-
-function testInMode(mode) {
- promise_test(async function () {
- await prepare(this);
- const host = document.createElement('div');
- container.appendChild(host);
- const shadowRoot = host.attachShadow({mode});
- shadowRoot.innerHTML = '<input>';
- assert_equals(document.activeElement, defaultFocus);
- assert_equals(shadowRoot.activeElement, null);
- assert_false(host.matches(':focus'));
- }, `:focus must not match a shadow host with ${mode} mode shadow root that does not contain the focused element`);
-
- promise_test(async function () {
- await prepare(this);
- const host = document.createElement('div');
- document.body.appendChild(host);
- const shadowRoot = host.attachShadow({mode});
- shadowRoot.innerHTML = '<input>';
- shadowRoot.firstChild.focus();
- assert_equals(document.activeElement, host);
- assert_equals(shadowRoot.activeElement, shadowRoot.firstChild);
- assert_true(host.matches(':focus'));
- }, `:focus must match a shadow host with ${mode} mode shadow root that contains the focused element`);
-
- promise_test(async function () {
- await prepare(this);
- const host = document.createElement('div');
- container.appendChild(host);
- const shadowRoot = host.attachShadow({mode});
- shadowRoot.innerHTML = '<slot>';
- host.innerHTML = '<input>';
- host.firstChild.focus();
- assert_equals(document.activeElement, host.firstChild);
- assert_equals(shadowRoot.activeElement, null);
- assert_false(host.matches(':focus'));
- }, `:focus must not match a shadow host with ${mode} mode shadow root contains the focused element assigned to a slot`);
-
-}
-
-testInMode('open');
-testInMode('closed');
-
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1-expected.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1-expected.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1-expected.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
- <body>
- <p>Test passes if you see a single 100px by 100px green box below.</p>
- <div style="width: 100px; height: 100px; background: green;"></div>
- </body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content=":focus should match a shadow host which contains the focused element">
-<link rel="help" href=""
-</head>
-<body>
-<p>Test passes if you see a single 100px by 100px green box below.</p>
-<div id="host"></div>
-<style>
-#host { background: red; width: 100px; height: 100px; }
-#host:focus { background: green; }
-</style>
-<script>
-
-const shadowRoot = host.attachShadow({mode: 'closed'});
-shadowRoot.innerHTML = '<div tabindex="0" style="outline: none;"></div>';
-shadowRoot.firstChild.focus();
-
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2-expected.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2-expected.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2-expected.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
- <body>
- <p>Test passes if you see a single 100px by 100px green box below.</p>
- <div style="width: 100px; height: 100px; background: green;"></div>
- </body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content=":focus should match a shadow host which contains the focused element">
-<link rel="help" href=""
-</head>
-<body>
-<p>Test passes if you see a single 100px by 100px green box below.</p>
-<div id="host"><span>FAIL</span></div>
-<style>
-#host { background: green; width: 100px; height: 100px; }
-#host span { background: red; }
-#host:focus span { background: green; color: green; }
-</style>
-<script>
-
-const shadowRoot = host.attachShadow({mode: 'closed'});
-shadowRoot.innerHTML = '<div tabindex="0" style="outline: none;"><slot></slot></div>';
-shadowRoot.firstChild.focus();
-
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3-expected.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3-expected.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3-expected.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
- <body>
- <p>Test passes if you see a single 100px by 100px green box below.</p>
- <div style="width: 100px; height: 100px; background: green;"></div>
- </body>
-</html>
Deleted: trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html (271943 => 271944)
--- trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="author" title="Ryosuke Niwa" href=""
-<meta name="assert" content=":focus should not match a shadow host if the focused element is a slotted content">
-<link rel="help" href=""
-</head>
-<body>
-<p>Test passes if you see a single 100px by 100px green box below.</p>
-<div id="host"><div id="target" tabindex="0"></div></div>
-<style>
-#host { background: green; width: 100px; height: 100px; }
-#host:focus #target { background: red; width: 100px; height: 100px; }
-#target { outline: none; }
-</style>
-<script>
-
-const shadowRoot = host.attachShadow({mode: 'closed'});
-shadowRoot.innerHTML = '<slot></slot>';
-target.focus();
-
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (271943 => 271944)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-01-27 11:41:20 UTC (rev 271944)
@@ -1,3 +1,22 @@
+2021-01-27 Manuel Rego Casasnovas <[email protected]>
+
+ 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 <[email protected]>
Complete WebXRRigidTransform implementation
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host-expected.txt (from rev 271943, trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host-expected.txt) (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host-expected.txt 2021-01-27 11:41:20 UTC (rev 271944)
@@ -0,0 +1,9 @@
+
+
+PASS :focus must not match a shadow host with open mode shadow root that does not contain the focused element
+PASS :focus must match a shadow host with open mode shadow root that contains the focused element
+PASS :focus must not match a shadow host with open mode shadow root contains the focused element assigned to a slot
+PASS :focus must not match a shadow host with closed mode shadow root that does not contain the focused element
+PASS :focus must match a shadow host with closed mode shadow root that contains the focused element
+PASS :focus must not match a shadow host with closed mode shadow root contains the focused element assigned to a slot
+
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html (from rev 271943, trunk/LayoutTests/fast/shadow-dom/focus-pseudo-matches-on-shadow-host.html) (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-matches-on-shadow-host.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="author" title="Ryosuke Niwa" href=""
+<meta name="assert" content=":focus should match a shadow host which contains the focused element">
+<link rel="help" href=""
+<link rel="help=" href=""
+<script src=""
+<script src=""
+</head>
+<body>
+<input id="defaultFocus" autofocus>
+<div id="log"></div>
+<div id="container"></div>
+<script>
+
+let focusedDefault = false;
+function didFocusDefault() { }
+function checkFocusMatch() {
+ focusedDefault = true;
+ didFocusDefault();
+}
+defaultFocus.addEventListener('focus', checkFocusMatch);
+
+function prepare(test)
+{
+ test.add_cleanup(() => {
+ defaultFocus.focus();
+ container.textContent = '';
+ });
+ return new Promise((resolve) => {
+ if (focusedDefault)
+ resolve();
+ else
+ didFocusDefault = resolve;
+ });
+}
+
+function testInMode(mode) {
+ promise_test(async function () {
+ await prepare(this);
+ const host = document.createElement('div');
+ container.appendChild(host);
+ const shadowRoot = host.attachShadow({mode});
+ shadowRoot.innerHTML = '<input>';
+ assert_equals(document.activeElement, defaultFocus);
+ assert_equals(shadowRoot.activeElement, null);
+ assert_false(host.matches(':focus'));
+ }, `:focus must not match a shadow host with ${mode} mode shadow root that does not contain the focused element`);
+
+ promise_test(async function () {
+ await prepare(this);
+ const host = document.createElement('div');
+ document.body.appendChild(host);
+ const shadowRoot = host.attachShadow({mode});
+ shadowRoot.innerHTML = '<input>';
+ shadowRoot.firstChild.focus();
+ assert_equals(document.activeElement, host);
+ assert_equals(shadowRoot.activeElement, shadowRoot.firstChild);
+ assert_true(host.matches(':focus'));
+ }, `:focus must match a shadow host with ${mode} mode shadow root that contains the focused element`);
+
+ promise_test(async function () {
+ await prepare(this);
+ const host = document.createElement('div');
+ container.appendChild(host);
+ const shadowRoot = host.attachShadow({mode});
+ shadowRoot.innerHTML = '<slot>';
+ host.innerHTML = '<input>';
+ host.firstChild.focus();
+ assert_equals(document.activeElement, host.firstChild);
+ assert_equals(shadowRoot.activeElement, null);
+ assert_false(host.matches(':focus'));
+ }, `:focus must not match a shadow host with ${mode} mode shadow root contains the focused element assigned to a slot`);
+
+}
+
+testInMode('open');
+testInMode('closed');
+
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1-expected.xht (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1-expected.xht (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1-expected.xht 2021-01-27 11:41:20 UTC (rev 271944)
@@ -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="" />
+ <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>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html (from rev 271943, trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-1.html) (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-1.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="author" title="Ryosuke Niwa" href=""
+<meta name="assert" content=":focus should match a shadow host which contains the focused element">
+<link rel="help" href=""
+<link rel="help=" href=""
+<link rel="match" href=""
+</head>
+<body>
+<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; }
+#host:focus { background: green; }
+</style>
+<script>
+
+const shadowRoot = host.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = '<div tabindex="0" style="outline: none;"></div>';
+shadowRoot.firstChild.focus();
+
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2-expected.xht (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2-expected.xht (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2-expected.xht 2021-01-27 11:41:20 UTC (rev 271944)
@@ -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="" />
+ <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>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html (from rev 271943, trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-2.html) (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-2.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="author" title="Ryosuke Niwa" href=""
+<meta name="assert" content=":focus should match a shadow host which contains the focused element">
+<link rel="help" href=""
+<link rel="help=" href=""
+<link rel="match" href=""
+</head>
+<body>
+<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; }
+#host span { background: red; }
+#host:focus span { background: green; color: green; }
+</style>
+<script>
+
+const shadowRoot = host.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = '<div tabindex="0" style="outline: none;"><slot></slot></div>';
+shadowRoot.firstChild.focus();
+
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3-expected.xht (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3-expected.xht (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3-expected.xht 2021-01-27 11:41:20 UTC (rev 271944)
@@ -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="" />
+ <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>
Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html (from rev 271943, trunk/LayoutTests/fast/shadow-dom/focus-pseudo-on-shadow-host-3.html) (0 => 271944)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/focus/focus-pseudo-on-shadow-host-3.html 2021-01-27 11:41:20 UTC (rev 271944)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="author" title="Ryosuke Niwa" href=""
+<meta name="assert" content=":focus should not match a shadow host if the focused element is a slotted content">
+<link rel="help" href=""
+<link rel="help=" href=""
+<link rel="match" href=""
+</head>
+<body>
+<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; }
+#host:focus #target { background: red; width: 100px; height: 100px; }
+#target { outline: none; }
+</style>
+<script>
+
+const shadowRoot = host.attachShadow({mode: 'closed'});
+shadowRoot.innerHTML = '<slot></slot>';
+target.focus();
+
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (271943 => 271944)
--- trunk/LayoutTests/platform/ios/TestExpectations 2021-01-27 11:06:21 UTC (rev 271943)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2021-01-27 11:41:20 UTC (rev 271944)
@@ -808,6 +808,10 @@
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 ]