Update web-platform-tests to revision 8b1aea6eed110e7900f1df933b24945fbb3c8229

This commit is contained in:
WPT Sync Bot 2020-08-04 08:22:01 +00:00
parent 8bf3440380
commit 1cd53da938
113 changed files with 2292 additions and 900 deletions

View file

@ -7,7 +7,7 @@
<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="help" href="https://www.w3.org/TR/css-pseudo-4/#highlight-styling">
<link rel="match" href="reference/active-selection-011-ref.html">
<link rel="match" href="reference/active-selection-018-ref.html">
<meta content="" name="flags">
@ -55,6 +55,6 @@
<body onload="startTest();">
<p>Test passes if each glyph of "Selected Text" is green and if there is <strong>no red</strong>.
<p>Test passes if each glyph of "Selected Text" is green, if background color of each glyph of "Selected Text" is white and if there is <strong>no red</strong>.
<div id="parent">Selected Text <span>FAIL</span></div>

View file

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and image</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-painting">
<link rel="mismatch" href="reference/active-selection-041-notref.html">
<meta content="should" name="flags">
<meta name="assert" content="In this test, a filled yellow image is selected and is overlaid with an opaque blue background color. The specification states that, for replaced content, the UA should create a semi-transparent wash to coat the content. But such semi-transparent wash could use a transparency of 0.3 or 0.5 or 0.7: so, we do not know. Therefore we can not predict the rendered end result. All we can be sure of is that the image, once selected, must not be identical to its original non-selected version. This test checks precisely and only this.">
<!--
"
(...) for replaced content, the UA should create
a semi-transparent wash to coat the content so
that it can show through the selection.
"
coming from
https://www.w3.org/TR/css-pseudo-4/#highlight-painting
-->
<!--
July 28th 2020
Firefox 68.10.0 ESR will create a resulting
background color of #7F7F80, which looks like
dark gray.
Chrome 83.0.4103.116 will create a resulting
background color of #33CCCC which looks like
dark blue.
July 28th 2020
-->
<style>
div
{
font-size: 300%;
}
img
{
vertical-align: top;
}
/*
Chromium 80+ will highlight space
below and above content box while
Firefox 72+ only highlights the image itself.
Therefore this 'vertical-align: top' declaration
to work around this possible behavior.
*/
img::selection
{
background-color: blue;
/*
equivalent to rgb(0, 0, 255) or rgb(0%, 0%, 100%)
or rgba(0, 0, 255, 1) or #0000FF
*/
}
</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 */
document.documentElement.className = "";
}
</script>
<body onload="startTest();">
<p>Test passes if there is a filled square which is <strong>not yellow</strong>.
<div id="test"><img src="../support/swatch-yellow.png" width="100" height="100" alt="Image download support must be enabled"></div>

View file

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="UTF-8">
<title>CSS Pseudo-Elements Test: active selection and image (complex)</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-bounds">
<link rel="match" href="../reference/ref-nothing-below.xht">
<meta content="" name="flags">
<meta name="assert" content="In this test, a filled red image has a padding belt painted red and a red border. This test checks that the associated overlay for an image must not leak outside the image's border box.">
<!--
"
For replaced content, the associated overlay must cover
at least the entire replaced object, and may extend
outward to include the element's entire content box.
The overlay may also include other other areas within
the border-box of an element (...)
"
coming from
https://www.w3.org/TR/css-pseudo-4/#highlight-bounds
-->
<style>
div
{
font-size: 300%;
}
img
{
background-color: red;
/* so that the padding belt is painted red */
border: red solid 10px;
padding: 10px;
}
/*
Chromium 80+ highlights the descender space
below the baseline on which the image "sits" while
Firefox 72+ only highlights the image itself.
*/
img::selection
{
background-color: red;
color: red;
}
span#masking
{
background-color: white;
display: inline-block;
height: 100px;
position: relative;
right: 100px;
width: 100px;
}
</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 */
document.documentElement.className = "";
}
</script>
<body onload="startTest();">
<p>Test passes if there is nothing below.
<div id="test"><img src="support/60x60-red.png" alt="Image download support must be enabled"><span id="masking"></span></div>

View file

@ -0,0 +1,19 @@
<!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
{
color: green;
font-size: 300%;
}
</style>
<p>Test passes if each glyph of "Selected Text" is green, if background color of each glyph of "Selected Text" is white and if there is <strong>no red</strong>.
<div>Selected Text</div>

View file

@ -0,0 +1,11 @@
<!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/">
<p>Test passes if there is a filled square which is <strong>not yellow</strong>.
<div><img src="../../support/swatch-yellow.png" width="100" height="100" alt="Image download support must be enabled"></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B