Update web-platform-tests to revision 1918e328d632ab5b15096c26bd1400dcba7dd4e5

This commit is contained in:
WPT Sync Bot 2020-09-30 08:21:28 +00:00
parent da9809caf0
commit 0092318a73
131 changed files with 1937 additions and 255 deletions

View file

@ -6,27 +6,38 @@
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-selectors">
<link rel="match" href="reference/active-selection-024-ref.html">
<link rel="match" href="reference/active-selection-025-ref.html">
<meta content="" name="flags">
<meta name="assert" content="In this test, the ::selection pseudo-element must paint over the ::first-letter pseudo-element since the first letter is being selected.">
<meta name="assert" content="In this test, the div::selection selector has no 'color' declaration. The div::selection selector should use the 'color' declaration from the div rule and, for the first letter only, it should use the 'color' declaration from the ::first-letter pseudo-element. Therefore the first letter 'S' should be purple and the rest of the words should be green.">
<!--
More info:
[css-pseudo-4] Original color of highlight pseudo inside
::first-letter/::first-line
https://github.com/w3c/csswg-drafts/issues/4625
RESOLVED: Whatever highlight being applied uses colors from before
even if came from pseudo element like ::first-letter/::first-line
-->
<style>
div
{
color: black;
color: green;
font-size: 300%;
}
div::first-letter
{
color: red;
color: purple;
}
div::selection
{
background-color: yellow;
color: green;
}
</style>
@ -44,6 +55,6 @@
<body onload="startTest();">
<p>Test passes if background color of "Selected Text" is yellow and if each glyph of "Selected Text" is green.
<p>Test passes if background color of "Selected Text" is yellow, if the "S" glyph is purple and if the other glyphs are green.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,60 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and first-line pseudo-element</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-selectors">
<link rel="match" href="reference/active-selection-027-ref.html">
<meta content="" name="flags">
<meta name="assert" content="In this test, the div::selection selector has no 'color' declaration. The div::selection selector should use the 'color' declaration from the div rule and, for the first line only, it should use the 'color' declaration from the ::first-line pseudo-element. Therefore the '1st selected text' should be purple and the '2nd selected text' should be green.">
<!--
More info:
[css-pseudo-4] Original color of highlight pseudo inside
::first-letter/::first-line
https://github.com/w3c/csswg-drafts/issues/4625
RESOLVED: Whatever highlight being applied uses colors from before
even if came from pseudo element like ::first-letter/::first-line
-->
<style>
div
{
color: green;
font-size: 300%;
}
div::first-line
{
color: purple;
}
div::selection
{
background-color: yellow;
}
</style>
<script>
function startTest()
{
var targetRange = document.createRange();
/* We first create an empty range */
targetRange.selectNodeContents(document.getElementById("test"));
/* Then we set the range boundaries to the children of div#test */
window.getSelection().addRange(targetRange);
/* Finally, we now select such range of content */
}
</script>
<body onload="startTest();">
<p>Test passes if both "selected text" have a yellow background, if the glyphs of "1st selected text" are purple and if the glyphs of "2nd selected text" are green.
<div id="test">1st selected text<br>2nd selected text</div>

View file

@ -14,8 +14,13 @@
display: inline;
font-size: 300%;
}
span
{
color: purple;
}
</style>
<p>Test passes if background color of "Selected Text" is yellow and if each glyph of "Selected Text" is green.
<p>Test passes if background color of "Selected Text" is yellow, if the "S" glyph is purple and if the other glyphs are green.
<div>Selected Text</div>
<div><span>S</span>elected Text</div>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<style>
div
{
font-size: 300%;
}
span
{
background-color: yellow;
}
span#first
{
color: purple;
}
span#second
{
color: green;
}
</style>
<p>Test passes if both "selected text" have a yellow background, if the glyphs of "1st selected text" are purple and if the glyphs of "2nd selected text" are green.
<div><span id="first">1st selected text</span></div>
<div><span id="second">2nd selected text</span></div>