Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'

This commit is contained in:
WPT Sync Bot 2021-09-07 11:16:33 +00:00 committed by cybai
parent 35e95f55a1
commit 58e8ee674b
9438 changed files with 266112 additions and 106976 deletions

View file

@ -0,0 +1,2 @@
<!doctype html>
<input type=checkbox checked style="accent-color: blue">

View file

@ -0,0 +1,9 @@
<!doctype html>
<title>Accent color changes colors of a checked checkbox</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" title="https://drafts.csswg.org/css-ui-4/#widget-accent">
<link rel="help" title="https://bugzilla.mozilla.org/show_bug.cgi?id=1705605">
<link rel="mismatch" href="accent-color-checkbox-checked-001-notref.html">
<input type=checkbox checked style="accent-color: red">

View file

@ -0,0 +1,24 @@
<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#outer { accent-color: red; color: black; }
</style>
<div id="outer">
<div id="target"></div>
</div>
<div id=noAccentColor></div>
<script>
test_computed_value('accent-color', 'initial', 'auto');
test_computed_value('accent-color', 'inherit', 'rgb(255, 0, 0)');
test_computed_value('accent-color', 'red', 'rgb(255, 0, 0)');
test_computed_value('accent-color', 'blue', 'rgb(0, 0, 255)');
test_computed_value('accent-color', 'auto', 'auto');
test_computed_value('accent-color', 'currentcolor', 'rgb(0, 0, 0)');
test_computed_value('accent-color', '#fff', 'rgb(255, 255, 255)');
// When accent-color isn't specified, it should return 'auto'
assert_equals(getComputedStyle(noAccentColor).accentColor, 'auto');
</script>

View file

@ -0,0 +1,4 @@
<!DOCTYPE html>
<div style="accent-color: red">
The following checkbox should be red: <input type=checkbox checked>
</div>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1225661">
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=match href="accent-color-invalidation-currentcolor-ref.html">
<div style="accent-color: currentColor">
The following checkbox should be red: <input type=checkbox checked>
</div>
<script>
async function rAF() {
return new Promise(resolve => requestAnimationFrame(resolve));
}
(async () => {
await rAF();
await rAF();
document.querySelector('input').style = 'color: red';
await rAF();
await rAF();
document.documentElement.classList.remove('reftest-wait');
})();
</script>

View file

@ -0,0 +1,4 @@
<!DOCTYPE html>
<div style="accent-color: red; color: red">
The following checkbox should be red: <input type=checkbox checked>
</div>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1225661">
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=match href="accent-color-parent-currentcolor-ref.html">
<div style="accent-color: currentColor; color: red">
The following checkbox should be red: <input type=checkbox checked style="color:unset">
</div>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>Parsing of accent-color</title>
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<div id="target"></div>
<script>
test_valid_value('accent-color', 'initial');
test_valid_value('accent-color', 'inherit');
test_valid_value('accent-color', 'unset');
test_valid_value('accent-color', 'revert');
test_valid_value('accent-color', 'auto');
test_valid_value('accent-color', 'red');
test_valid_value('accent-color', 'blue');
test_valid_value('accent-color', 'currentcolor');
test_valid_value('accent-color', '#fff', 'rgb(255, 255, 255)');
test_invalid_value('accent-color', 'auto auto');
</script>

View file

@ -0,0 +1,4 @@
<!DOCTYPE html>
<a href="">
<input type=checkbox checked>
</a>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<link rel="match" href="accent-color-visited-ref.html">
<!-- :visited shouldn't apply to accent-color. -->
<style>
:visited {
accent-color: red;
}
</style>
<a href="">
<input type=checkbox checked>
</a>

View file

@ -0,0 +1,106 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>accent-color interpolation</title>
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
accent-color: blue;
}
.target {
display: inline-block;
font-size: 60pt;
accent-color: yellow;
}
.expected {
margin-right: 15px;
}
</style>
<body contenteditable>
<template id="target-template">T</template>
</body>
<script>
test_interpolation({
property: 'accent-color',
from: neutralKeyframe,
to: 'green',
}, [
{at: -0.3, expect: 'rgb(255, 255, 0)'},
{at: 0, expect: 'rgb(255, 255, 0)'},
{at: 0.3, expect: 'rgb(179, 217, 0)'},
{at: 0.6, expect: 'rgb(102, 179, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 65, 0)'},
]);
test_no_interpolation({
property: 'accent-color',
from: 'initial',
to: 'green',
});
test_no_interpolation({
property: 'accent-color',
from: 'auto',
to: 'green',
});
test_interpolation({
property: 'accent-color',
from: 'currentColor',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(0, 38, 0)'},
{at: 0.6, expect: 'rgb(0, 77, 0)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'accent-color',
from: 'inherit',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 255)'},
{at: 0, expect: 'rgb(0, 0, 255)'},
{at: 0.3, expect: 'rgb(0, 38, 179)'},
{at: 0.6, expect: 'rgb(0, 77, 102)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'accent-color',
from: 'unset',
to: 'green',
}, [
{at: -0.3, expect: 'rgb(0, 0, 255)'},
{at: 0, expect: 'rgb(0, 0, 255)'},
{at: 0.3, expect: 'rgb(0, 38, 179)'},
{at: 0.6, expect: 'rgb(0, 77, 102)'},
{at: 1, expect: 'rgb(0, 128, 0)'},
{at: 1.5, expect: 'rgb(0, 192, 0)'},
]);
test_interpolation({
property: 'accent-color',
from: 'black',
to: 'orange',
}, [
{at: -0.3, expect: 'rgb(0, 0, 0)'},
{at: 0, expect: 'rgb(0, 0, 0)'},
{at: 0.3, expect: 'rgb(77, 50, 0)'},
{at: 0.6, expect: 'rgb(153, 99, 0)'},
{at: 1, expect: 'rgb(255, 165, 0)'},
{at: 1.5, expect: 'rgb(255, 248, 0)'},
]);
</script>

View file

@ -5,14 +5,16 @@
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net">
<meta name=flags content="should">
<meta name=assert content="To the extent that the outline follows the border edge, it should follow the border-radius curve.">
<!-- Allow slight color differences where the outline and the background intersect -->
<meta name=fuzzy content="0-2;0-100">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<link rel=help href="https://drafts.csswg.org/css-ui-3/#outline-props">
<style>
body > div {
width: 100px;
height: 100px;
overflow: hidden;
background: red;
border-radius: 100%;
display: table-cell; /* Make a BFC */
}
div > div {
@ -21,7 +23,8 @@ div > div {
margin: 25px;
background: green;
border-radius: 100%;
outline: solid green 25px;
outline: solid green 100px;
outline-offset: -1px;
}
</style>

View file

@ -12,11 +12,11 @@ body > div {
width: 100px;
height: 100px;
display: table-cell; /* Make a BFC */
background: rgb(255,128,255); /* inverse of rgb(0,127,0) */
background: rgb(255,127,255); /* inverse of green (rgb(0,128,0)) */
}
div > div {
color: rgb(0,127,0);
background: rgb(0,127,0);
color: green;
background: green;
margin: 25px;
width: 50px;
height: 50px;

View file

@ -9,7 +9,7 @@ div {
color: green;
}
span {
color: white;
color: transparent;
}
</style>