Update web-platform-tests to revision 90e1ee27eede63cf117f19c1e55553cc1881aef0

This commit is contained in:
WPT Sync Bot 2019-09-27 10:23:59 +00:00
parent 5fd4467cb3
commit 3f940e3f4c
89 changed files with 11097 additions and 382 deletions

View file

@ -0,0 +1,81 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#mixed-percentages">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
const property = 'margin-left';
function test_valid_length_percent(value, expected) {
test_valid_value(property, value, expected);
}
test_valid_length_percent('min(1px + 1%)', 'min(1px + 1%)');
test_valid_length_percent('min(1cm + 1%)', 'min(1cm + 1%)');
test_valid_length_percent('min(1mm + 1%)', 'min(1mm + 1%)');
test_valid_length_percent('min(1Q + 1%)', 'min(1q + 1%)');
test_valid_length_percent('min(1in + 1%)', 'min(1in + 1%)');
test_valid_length_percent('min(1pc + 1%)', 'min(1pc + 1%)');
test_valid_length_percent('min(1pt + 1%)', 'min(1pt + 1%)');
test_valid_length_percent('min(1em + 1%)', 'min(1em + 1%)');
test_valid_length_percent('min(1ex + 1%)', 'min(1ex + 1%)');
test_valid_length_percent('min(1ch + 1%)', 'min(1ch + 1%)');
test_valid_length_percent('min(1rem + 1%)', 'min(1rem + 1%)');
test_valid_length_percent('min(1vh + 1%)', 'min(1vh + 1%)');
test_valid_length_percent('min(1vw + 1%)', 'min(1vw + 1%)');
test_valid_length_percent('min(1vmin + 1%)', 'min(1vmin + 1%)');
test_valid_length_percent('min(1vmax + 1%)', 'min(1vmax + 1%)');
test_valid_length_percent('max(1px + 1%)', 'max(1px + 1%)');
test_valid_length_percent('max(1cm + 1%)', 'max(1cm + 1%)');
test_valid_length_percent('max(1mm + 1%)', 'max(1mm + 1%)');
test_valid_length_percent('max(1Q + 1%)', 'max(1q + 1%)');
test_valid_length_percent('max(1in + 1%)', 'max(1in + 1%)');
test_valid_length_percent('max(1pc + 1%)', 'max(1pc + 1%)');
test_valid_length_percent('max(1pt + 1%)', 'max(1pt + 1%)');
test_valid_length_percent('max(1em + 1%)', 'max(1em + 1%)');
test_valid_length_percent('max(1ex + 1%)', 'max(1ex + 1%)');
test_valid_length_percent('max(1ch + 1%)', 'max(1ch + 1%)');
test_valid_length_percent('max(1rem + 1%)', 'max(1rem + 1%)');
test_valid_length_percent('max(1vh + 1%)', 'max(1vh + 1%)');
test_valid_length_percent('max(1vw + 1%)', 'max(1vw + 1%)');
test_valid_length_percent('max(1vmin + 1%)', 'max(1vmin + 1%)');
test_valid_length_percent('max(1vmax + 1%)', 'max(1vmax + 1%)');
test_valid_length_percent('min(20px, 10%)', 'min(20px, 10%)');
test_valid_length_percent('min(1em, 10%)', 'min(1em, 10%)');
test_valid_length_percent('max(20px, 10%)', 'max(20px, 10%)');
test_valid_length_percent('max(1em, 10%)', 'max(1em, 10%)');
test_valid_length_percent('min(10%, 20px)', 'min(10%, 20px)');
test_valid_length_percent('min(10%, 1em)', 'min(10%, 1em)');
test_valid_length_percent('max(10%, 20px)', 'max(10%, 20px)');
test_valid_length_percent('max(10%, 1em)', 'max(10%, 1em)');
test_valid_length_percent('min(10% + 30px, 5% + 60px)', 'min(10% + 30px, 5% + 60px)')
test_valid_length_percent('max(10% + 2em, 5% + 1em)', 'max(10% + 2em, 5% + 1em)')
test_valid_length_percent('calc(min(10%) + max(1em) + min(20px))', 'calc(min(10%) + max(1em) + min(20px))');
test_valid_length_percent('calc(max(20px) + min(1em) + max(10%))', 'calc(max(20px) + min(1em) + max(10%))');
test_valid_length_percent('calc(max(10%) + min(1em) + max(20px))', 'calc(max(10%) + min(1em) + max(20px))');
test_valid_length_percent('calc(min(20px) + max(1em) + min(10%))', 'calc(min(20px) + max(1em) + min(10%))');
test_valid_length_percent('calc(20px + min(10%))', 'calc(20px + min(10%))');
test_valid_length_percent('calc(10% + min(20px))', 'calc(10% + min(20px))');
test_valid_length_percent('calc(1em + min(10%))', 'calc(1em + min(10%))');
test_valid_length_percent('calc(10% + min(1em))', 'calc(10% + min(1em))');
test_valid_length_percent('calc(min(10%) + 20px)', 'calc(20px + min(10%))');
test_valid_length_percent('calc(min(20px) + 10%)', 'calc(10% + min(20px))');
test_valid_length_percent('calc(min(10%) + 1em)', 'calc(1em + min(10%))');
test_valid_length_percent('calc(min(1em) + 10%)', 'calc(10% + min(1em))');
test_valid_length_percent('calc(20px + max(10%))', 'calc(20px + max(10%))');
test_valid_length_percent('calc(10% + max(20px))', 'calc(10% + max(20px))');
test_valid_length_percent('calc(1em + max(10%))', 'calc(1em + max(10%))');
test_valid_length_percent('calc(10% + max(1em))', 'calc(10% + max(1em))');
test_valid_length_percent('calc(max(10%) + 20px)', 'calc(20px + max(10%))');
test_valid_length_percent('calc(max(20px) + 10%)', 'calc(10% + max(20px))');
test_valid_length_percent('calc(max(10%) + 1em)', 'calc(1em + max(10%))');
test_valid_length_percent('calc(max(1em) + 10%)', 'calc(10% + max(1em))');
</script>

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#lengths">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
const property = 'letter-spacing';
function test_valid_length(value, expected) {
test_valid_value(property, value, expected);
}
test_valid_length('min(1px)', 'min(1px)');
test_valid_length('min(1cm)', 'min(1cm)');
test_valid_length('min(1mm)', 'min(1mm)');
// Values are case-insensitive and serialize as lower case, for example 1Q
// serializes as 1q.
test_valid_length('min(1Q)', 'min(1q)');
test_valid_length('min(1in)', 'min(1in)');
test_valid_length('min(1pc)', 'min(1pc)');
test_valid_length('min(1pt)', 'min(1pt)');
test_valid_length('min(1em)', 'min(1em)');
test_valid_length('min(1ex)', 'min(1ex)');
test_valid_length('min(1ch)', 'min(1ch)');
test_valid_length('min(1rem)', 'min(1rem)');
test_valid_length('min(1vh)', 'min(1vh)');
test_valid_length('min(1vw)', 'min(1vw)');
test_valid_length('min(1vmin)', 'min(1vmin)');
test_valid_length('min(1vmax)', 'min(1vmax)');
test_valid_length('max(1px)', 'max(1px)');
test_valid_length('max(1cm)', 'max(1cm)');
test_valid_length('max(1mm)', 'max(1mm)');
test_valid_length('max(1Q)', 'max(1q)');
test_valid_length('max(1in)', 'max(1in)');
test_valid_length('max(1pc)', 'max(1pc)');
test_valid_length('max(1pt)', 'max(1pt)');
test_valid_length('max(1em)', 'max(1em)');
test_valid_length('max(1ex)', 'max(1ex)');
test_valid_length('max(1ch)', 'max(1ch)');
test_valid_length('max(1rem)', 'max(1rem)');
test_valid_length('max(1vh)', 'max(1vh)');
test_valid_length('max(1vw)', 'max(1vw)');
test_valid_length('max(1vmin)', 'max(1vmin)');
test_valid_length('max(1vmax)', 'max(1vmax)');
test_valid_length('min(10px, 20px, 30px)', 'min(10px, 20px, 30px)');
test_valid_length('min(30px, 20px, 10px)', 'min(30px, 20px, 10px)');
test_valid_length('min(20px, 1em, 10vw)', 'min(20px, 1em, 10vw)');
test_valid_length('min(10vw, 1em, 20px)', 'min(10vw, 1em, 20px)');
test_valid_length('max(10px, 20px, 30px)', 'max(10px, 20px, 30px)');
test_valid_length('max(30px, 20px, 10px)', 'max(30px, 20px, 10px)');
test_valid_length('max(20px, 1em, 10vw)', 'max(20px, 1em, 10vw)');
test_valid_length('max(10vw, 1em, 20px)', 'max(10vw, 1em, 20px)');
test_valid_length('calc(min(10px) + max(1em) + min(10vw))', 'calc(min(10px) + max(1em) + min(10vw))');
test_valid_length('calc(max(1em) + min(10vw) + max(10px))', 'calc(max(1em) + min(10vw) + max(10px))');
test_valid_length('calc(10px + min(1em))', 'calc(10px + min(1em))');
test_valid_length('calc(min(1em) + 10px)', 'calc(10px + min(1em))');
test_valid_length('calc(10px + max(1em))', 'calc(10px + max(1em))');
test_valid_length('calc(max(1em) + 10px)', 'calc(10px + max(1em))');
</script>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#numbers">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_valid_number(value, expected) {
test_valid_value('opacity', value, expected);
}
test_valid_number('min(1)', 'min(1)');
test_valid_number('max(1)', 'max(1)');
test_valid_number('min(1, 2, 3)', 'min(1, 2, 3)');
test_valid_number('min(3, 2, 1)', 'min(3, 2, 1)');
test_valid_number('max(1, 2, 3)', 'max(1, 2, 3)');
test_valid_number('max(3, 2, 1)', 'max(3, 2, 1)');
test_valid_number('calc(min(1) + min(2))', 'calc(min(1) + min(2))');
test_valid_number('calc(max(1) + max(2))', 'calc(max(1) + max(2))');
test_valid_number('calc(1 + min(1))', 'calc(1 + min(1))');
test_valid_number('calc(min(1) + 1)', 'calc(1 + min(1))');
test_valid_number('calc(1 + max(1))', 'calc(1 + max(1))');
test_valid_number('calc(max(1) + 1)', 'calc(1 + max(1))');
</script>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#percentages">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_valid_percentage(value, expected) {
test_valid_value('margin-left', value, expected);
}
test_valid_percentage('min(1%)', 'min(1%)');
test_valid_percentage('max(1%)', 'max(1%)');
test_valid_percentage('min(1%, 2%, 3%)', 'min(1%, 2%, 3%)');
test_valid_percentage('min(3%, 2%, 1%)', 'min(3%, 2%, 1%)');
test_valid_percentage('max(1%, 2%, 3%)', 'max(1%, 2%, 3%)');
test_valid_percentage('max(3%, 2%, 1%)', 'max(3%, 2%, 1%)');
test_valid_percentage('calc(min(1%) + min(2%))', 'calc(min(1%) + min(2%))');
test_valid_percentage('calc(max(1%) + max(2%))', 'calc(max(1%) + max(2%))');
test_valid_percentage('calc(1% + min(1%))', 'calc(1% + min(1%))');
test_valid_percentage('calc(min(1%) + 1%)', 'calc(1% + min(1%))');
test_valid_percentage('calc(1% + max(1%))', 'calc(1% + max(1%))');
test_valid_percentage('calc(max(1%) + 1%)', 'calc(1% + max(1%))');
</script>