mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Check for typed arithmetic in css progress() math function Don't allow intermediate nodes to be accepted there, as only nodes with canonical units are allowed to be parameters to such function. Bug: 40768696 Change-Id: If17737b77c260a93f35d95932dd407262fc6f8dd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6802326 Reviewed-by: Rune Lillesveen <[email protected]> Commit-Queue: Daniil Sakhapov <[email protected]> Cr-Commit-Position: refs/heads/main@{#1494756} -- wpt-commits: 2ee15f8563505f2a2323d715e59a47f9e450cc25 wpt-pr: 54073
47 lines
1.8 KiB
HTML
47 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/css-values-5/#progress">
|
|
<link rel="author" title="[email protected]">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../support/parsing-testcommon.js"></script>
|
|
<script>
|
|
function test_invalid_number(value) {
|
|
test_invalid_value('opacity', value);
|
|
}
|
|
function test_invalid_length(value) {
|
|
// 'letter-spacing' accepts <length> only, not <percentage> or any mixes.
|
|
test_invalid_value('letter-spacing', value);
|
|
}
|
|
|
|
// Syntax checking
|
|
test_invalid_number('progress()');
|
|
test_invalid_number('progress( )');
|
|
test_invalid_number('progress(,)');
|
|
test_invalid_number('progress(1, )');
|
|
test_invalid_number('progress(1)');
|
|
test_invalid_number('progress(50%, 0)');
|
|
test_invalid_number('progress(0, 1,)');
|
|
test_invalid_number('progress(from,)');
|
|
test_invalid_number('progress(from 1, 0)');
|
|
test_invalid_number('progress(from 1, 0 1)');
|
|
test_invalid_number('progress(from 1 0)');
|
|
test_invalid_number('progress(0,, 0)');
|
|
test_invalid_number('progress(to,,,,)');
|
|
test_invalid_number('progress(0,,, 10,, 200)');
|
|
test_invalid_number('progress(0,,, 10,,, 200)');
|
|
test_invalid_number('progress(0,, 10,, 200)');
|
|
test_invalid_number('progress(0 from 10 to 200)');
|
|
|
|
// General tests
|
|
test_invalid_number('progress(5%, 0, 8');
|
|
test_invalid_number('progress(5%, 0deg, 8deg');
|
|
test_invalid_number('progress(5, 0deg, 8deg');
|
|
test_invalid_number('progress(5, 0%, 8deg');
|
|
test_invalid_number('progress(5, 0%, sign(10px)');
|
|
test_invalid_number('progress(5%, 0px, 10px');
|
|
test_invalid_length('calc(1px * progress(10deg, 0, 10))');
|
|
test_invalid_length('calc(1px * progress(10, 0px, 10))');
|
|
test_invalid_number('progress(10px * 10px, 10px * 10px, 10px * 10px)');
|
|
test_invalid_number('progress(10px, 10px * 10px, 10px * 10px)');
|
|
</script>
|