tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

hypot-pow-sqrt-invalid.html (2494B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/css-values-4/#exponent-funcs">
      3 <link rel="help" href="https://drafts.csswg.org/css-values-4/#numbers">
      4 <link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking">
      5 <link rel="author" title="Apple Inc">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="../support/parsing-testcommon.js"></script>
      9 <script>
     10 function test_invalid_number(value) {
     11  test_invalid_value('opacity', value);
     12 }
     13 function test_invalid_length(value) {
     14  // 'outline-offset' accepts <length> only, not <percentage> or any mixes.
     15  test_invalid_value('outline-offset', value);
     16 }
     17 
     18 // Syntax checking
     19 test_invalid_number('hypot()');
     20 test_invalid_number('hypot( )');
     21 test_invalid_number('hypot(,)');
     22 test_invalid_number('hypot(1, )');
     23 test_invalid_number('hypot(, 1)');
     24 test_invalid_number('hypot(1 + )');
     25 test_invalid_number('hypot(1 - )');
     26 test_invalid_number('hypot(1 * )');
     27 test_invalid_number('hypot(1 / )');
     28 test_invalid_number('hypot(1 2)');
     29 test_invalid_number('hypot(1, , 2)');
     30 test_invalid_number('sqrt()');
     31 test_invalid_number('sqrt( )');
     32 test_invalid_number('sqrt(,)');
     33 test_invalid_number('sqrt(1, )');
     34 test_invalid_number('sqrt(, 1)');
     35 test_invalid_number('sqrt(1 + )');
     36 test_invalid_number('sqrt(1 - )');
     37 test_invalid_number('sqrt(1 * )');
     38 test_invalid_number('sqrt(1 / )');
     39 test_invalid_number('sqrt(1 2)');
     40 test_invalid_number('sqrt(1, , 2)');
     41 test_invalid_number('sqrt(1, 2)');
     42 test_invalid_number('pow( )');
     43 test_invalid_number('pow(,)');
     44 test_invalid_number('pow(1, )');
     45 test_invalid_number('pow(, 1)');
     46 test_invalid_number('pow(1 + )');
     47 test_invalid_number('pow(1 - )');
     48 test_invalid_number('pow(1 * )');
     49 test_invalid_number('pow(1 / )');
     50 test_invalid_number('pow(1 2)');
     51 test_invalid_number('pow(1, , 2)');
     52 test_invalid_number('pow(2px, 2)');
     53 test_invalid_number('pow(10, 1px)');
     54 
     55 // General tests
     56 test_invalid_length('calc(1px * pow(1))');
     57 test_invalid_length('calc(1px * pow(2px, 3px))');
     58 test_invalid_length('calc(sqrt(100px)');
     59 test_invalid_length('hypot(2px, 3)');
     60 test_invalid_length('hypot(3, ,4)');
     61 test_invalid_length('hypot(1, 2)');
     62 test_invalid_length('calc(1px * pow(2 3))');
     63 test_invalid_length('hypot()');
     64 test_invalid_length('calc(pow(2))');
     65 test_invalid_length('pow())');
     66 test_invalid_length('pow(1, 2)');
     67 test_invalid_length('calc(sqrt())');
     68 test_invalid_length('calc(sqrt(100, 200))');
     69 test_invalid_length('pow(10px, 1)');
     70 </script>