| <!DOCTYPE html> | |
| <link rel="help" href="https://drafts.csswg.org/css-values-5/#progress"> | |
| <link rel="author" title="sakhapov@chromuim.org"> | |
| <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)'); | |
| test_invalid_number('progress(no-clamp)'); | |
| test_invalid_number('progress(no-clamp 1)'); | |
| test_invalid_number('progress(no-clamp 1, 0)'); | |
| test_invalid_number('progress(no-clamp 1 0 1)'); | |
| test_invalid_number('progress(no-clamp 1, 0 1)'); | |
| test_invalid_number('progress(no-clamp, 1, 0 1)'); | |
| test_invalid_number('progress(1 no-clamp, 0, 1)'); | |
| test_invalid_number('progress(1, 0, 1 no-clamp)'); | |
| // 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> |