progress-invalid.html (1847B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/css-values-5/#progress"> 3 <link rel="author" title="sakhapov@chromuim.org"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="../support/parsing-testcommon.js"></script> 7 <script> 8 function test_invalid_number(value) { 9 test_invalid_value('opacity', value); 10 } 11 function test_invalid_length(value) { 12 // 'letter-spacing' accepts <length> only, not <percentage> or any mixes. 13 test_invalid_value('letter-spacing', value); 14 } 15 16 // Syntax checking 17 test_invalid_number('progress()'); 18 test_invalid_number('progress( )'); 19 test_invalid_number('progress(,)'); 20 test_invalid_number('progress(1, )'); 21 test_invalid_number('progress(1)'); 22 test_invalid_number('progress(50%, 0)'); 23 test_invalid_number('progress(0, 1,)'); 24 test_invalid_number('progress(from,)'); 25 test_invalid_number('progress(from 1, 0)'); 26 test_invalid_number('progress(from 1, 0 1)'); 27 test_invalid_number('progress(from 1 0)'); 28 test_invalid_number('progress(0,, 0)'); 29 test_invalid_number('progress(to,,,,)'); 30 test_invalid_number('progress(0,,, 10,, 200)'); 31 test_invalid_number('progress(0,,, 10,,, 200)'); 32 test_invalid_number('progress(0,, 10,, 200)'); 33 test_invalid_number('progress(0 from 10 to 200)'); 34 35 // General tests 36 test_invalid_number('progress(5%, 0, 8'); 37 test_invalid_number('progress(5%, 0deg, 8deg'); 38 test_invalid_number('progress(5, 0deg, 8deg'); 39 test_invalid_number('progress(5, 0%, 8deg'); 40 test_invalid_number('progress(5, 0%, sign(10px)'); 41 test_invalid_number('progress(5%, 0px, 10px'); 42 test_invalid_length('calc(1px * progress(10deg, 0, 10))'); 43 test_invalid_length('calc(1px * progress(10, 0px, 10))'); 44 test_invalid_number('progress(10px * 10px, 10px * 10px, 10px * 10px)'); 45 test_invalid_number('progress(10px, 10px * 10px, 10px * 10px)'); 46 </script>