Update web-platform-tests to revision db527a4944833201557faf740d4717c3ebe4c75f

This commit is contained in:
WPT Sync Bot 2019-02-03 20:34:05 -05:00
parent 481662d0a7
commit 02a351684c
16 changed files with 163 additions and 23 deletions

View file

@ -16,9 +16,10 @@ https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793
<link rel="help" href="https://www.w3.org/TR/css-color-3/#transparency">
<link rel="help" href="https://www.w3.org/TR/css-text-3/#tab-size-property">
<link rel="help" href="https://www.w3.org/TR/css3-values/#calc-computed-value">
<link rel="help" href="https://www.w3.org/TR/css3-values/#calc-range">
<meta name="flags" content="invalid">
<meta content="This test verifies how 12 calc() functions are computed for 'opacity' and 'tab-size'." name="assert">
<meta content="This test verifies how 11 calc() functions are computed for 'opacity' and 'tab-size'." name="assert">
<script src="/resources/testharness.js"></script>
@ -41,12 +42,11 @@ https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793
elemTarget.style.setProperty(property_name, initial_value);
/*
In exactly 9 out of the 12 sub-tests, the initial_value will
act as a fallback value because the calc() function in the
specified value generates an invalid value. Since we are
running 12 consecutive tests on the same element, then
it is necessary to 'reset' its property to an initial
value.
In exactly 6 out of the 11 sub-tests, the initial_value will
act as a fallback value because the specified value generates
an invalid value. Since we are running 11 consecutive tests
on the same element, then it is necessary to 'reset' its
property to an initial value.
*/
elemTarget.style.setProperty(property_name, specified_value);
@ -60,11 +60,21 @@ https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793
verifyComputedStyle("tab-size", "initial", "calc(2 * 3)", "6", "testing tab-size: calc(2 * 3)");
verifyComputedStyle("tab-size", "12345", "calc(2 * -4)", "12345", "testing tab-size: calc(2 * -4)");
verifyComputedStyle("tab-size", "12345", "calc(2 * -4)", "0", "testing tab-size: calc(2 * -4)");
/*
an out-of-range value inside a calc() does not cause
the declaration to become invalid. The value resulting
from an expression must be clamped to the range
allowed in the target context.
https://www.w3.org/TR/css-values-3/#calc-range
*/
verifyComputedStyle("opacity", "initial", "calc(2 / 4)", "0.5", "testing opacity: calc(2 / 4)");
verifyComputedStyle("tab-size", "12345", "calc(2 / 4)", "0.5", "testing tab-size: calc(2 / 4)");
/*
'tab-size' accepts <number> values.
*/
verifyComputedStyle("opacity", "0.9", "calc(2 / 4) * 1px", "0.9", "testing opacity: calc(2 / 4) * 1px");