Update web-platform-tests to revision c1518503b6d1a94bdd5bf6426b8279293b2325d2

This commit is contained in:
WPT Sync Bot 2020-06-28 08:21:54 +00:00
parent af110ac21f
commit f0b9f552c9
39 changed files with 382 additions and 74 deletions

View file

@ -0,0 +1,32 @@
<!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%;
}
</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 "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and invalid declaration block</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-cascade">
<link rel="match" href="active-selection-051-ref.html">
<meta content="invalid should" name="flags">
<meta name="assert" content="In this test, the selector div::selection has an invalid declaration block. Therefore, it is ignored. In such case, the UA should use the OS-default highlight colors for div::selection.">
<style>
div
{
color: transparent;
font-size: 300%;
}
div::selection
{
foo: bar;
}
</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 "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and empty declaration block</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-cascade">
<link rel="match" href="active-selection-051-ref.html">
<meta content="should" name="flags">
<meta name="assert" content="In this test, neither color nor background-color have been specified for the selector div::selection. In such case, the UA should use the OS-default highlight colors for div::selection.">
<style>
div
{
color: transparent;
font-size: 300%;
}
div::selection
{
}
</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 "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and invalid color value</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-cascade">
<link rel="match" href="active-selection-051-ref.html">
<meta content="invalid should" name="flags">
<meta name="assert" content="In this test, 'color' has an invalid value which makes the declaration invalid; therefore, it is ignored. Therefore, the div::selection selector has neither color nor background-color specified. In such case, the UA should use the OS-default highlight colors for div::selection.">
<style>
div
{
color: transparent;
font-size: 300%;
}
div::selection
{
color: foo;
}
</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 "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and invalid background-color value</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-cascade">
<link rel="match" href="active-selection-051-ref.html">
<meta content="invalid should" name="flags">
<meta name="assert" content="In this test, 'background-color' has an invalid value which makes the declaration invalid; therefore, it is ignored. Therefore, the div::selection selector has neither color nor background-color specified. In such case, the UA should use the OS-default highlight colors for div::selection.">
<style>
div
{
color: transparent;
font-size: 300%;
}
div::selection
{
background-color: bar;
}
</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 "Selected Text" appears selected using the OS selection colors.
<div id="test">Selected Text</div>

View file

@ -0,0 +1,51 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and 3 consecutive &lt;br&gt; elements</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/ref-nothing-below.xht">
<!--
Issue 1018465: [CSS4-Pseudo] Active selection and hard wrap (or hard return)
line break: ::selection should not select <br>
https://bugs.chromium.org/p/chromium/issues/detail?id=1018465
-->
<meta content="" name="flags">
<meta name="assert" content="The &lt;br&gt; element is an empty element. Its background color can be painted but specifying its color should generate no rendering effect of any kind. Since the 'background-color' has been specified as 'transparent', then nothing should be painted or viewable in this test.">
<style>
div
{
font-size: 100px;
}
div::selection
{
background-color: transparent;
color: red;
}
</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 there is nothing below.
<div id="test">&nbsp;<br><br><br>&nbsp;</div>

View file

@ -0,0 +1,18 @@
<!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/" />
</head>
<body>
<p>Test passes if there is nothing below.</p>
</body>
</html>