Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7

This commit is contained in:
WPT Sync Bot 2018-06-22 21:05:34 -04:00
parent 728ebcc932
commit 8c46b67f8e
456 changed files with 10561 additions and 5108 deletions

View file

@ -0,0 +1,34 @@
<!doctype html>
<title>CSS Test: directionality propagation in Shadow DOM.</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="help" href="https://html.spec.whatwg.org/#the-dir-attribute">
<link rel="help" href="https://github.com/whatwg/html/issues/3699">
<link rel="match" href="reference/green-box.html">
<style>
div { width: 100px; }
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<div id="host1"></div>
<div id="host2" dir="rtl"></div>
<div id="host3"></div>
<div id="host4" dir="rtl"></div>
<script>
host1.attachShadow({ mode: "open" }).innerHTML = `
<style>:dir(ltr) { background: green; height: 25px; }</style>
<div></div>
`;
host2.attachShadow({ mode: "open" }).innerHTML = `
<style>:dir(rtl) { background: green; height: 25px; }</style>
<div></div>
`;
host3.attachShadow({ mode: "open" }).innerHTML = `
<style>:dir(rtl) { background: green; height: 25px; }</style>
<div></div>
`;
host4.attachShadow({ mode: "open" }).innerHTML = `
<style>span:dir(ltr) { display: block; background: green; height: 25px; }</style>
<div dir="ltr"><span></span></div>
`;
document.body.offsetTop;
host3.setAttribute("dir", "rtl");
</script>

View file

@ -0,0 +1,19 @@
<!doctype html>
<title>CSS Test: directionality propagation in Shadow DOM, appending a shadow host.</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="help" href="https://html.spec.whatwg.org/#the-dir-attribute">
<link rel="help" href="https://github.com/whatwg/html/issues/3699">
<link rel="match" href="reference/green-box.html">
<p>Test passes if you see a single 100px by 100px green box below.</p>
<style>
div { width: 100px; }
</style>
<div id="host-parent" dir="rtl"></div>
<script>
let host = document.createElement("div");
host.attachShadow({ mode: "open" }).innerHTML = `
<style>:dir(rtl) { background: green; height: 100px; width: 100px; }</style>
<div></div>
`;
document.getElementById("host-parent").appendChild(host);
</script>

View file

@ -0,0 +1,21 @@
<!doctype html>
<title>CSS Test: &lt;link rel="stylesheet"&gt; in Shadow DOM doesn't affect the normal DOM</title>
<link rel="help" href="https://html.spec.whatwg.org/#link-type-stylesheet">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<link rel="match" href="reference/green-box.html">
<p>Test passes if you see a single 100px by 100px green box below.</p>
<style>
#light-dom {
width: 100px;
height: 100px;
background: green;
color: green;
}
</style>
<div id="host">FAIL</div>
<div id="light-dom"></div>
<script>
host.attachShadow({ mode: "open" }).innerHTML = `
<link rel="stylesheet" href="data:text/css,div { background: red !important }">
`;
</script>

View file

@ -0,0 +1,11 @@
<!doctype html>
<title>CSS Test: &lt;link rel="stylesheet"&gt; in Shadow DOM</title>
<link rel="help" href="https://html.spec.whatwg.org/#link-type-stylesheet">
<link rel="match" href="reference/green-box.html">
<p>Test passes if you see a single 100px by 100px green box below.</p>
<div id="host">FAIL</div>
<script>
host.attachShadow({ mode: "open" }).innerHTML = `
<link rel="stylesheet" href="resources/host-green-box.css">
`;
</script>