tor-browser

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

text-combine-upright-parsing-invalid-001.html (5537B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Writing Modes: parsing text-combine-upright with invalid values</title>
      6 <link rel="author" title="Masataka Yakura" href="http://google.com/+MasatakaYakura">
      7 <link rel="help" href="http://www.w3.org/TR/css-writing-modes-4/#text-combine-upright">
      8 <meta name="assert" content="text-combine-upright doesn't support undefined keywords and out-of-range integer, and numbers.">
      9 <meta name="flags" content="dom invalid">
     10 <script src="/resources/testharness.js"></script>
     11 <script src="/resources/testharnessreport.js"></script>
     12 
     13 <style>
     14 #invalid_foo {
     15  text-decoration-upright: foo;
     16 }
     17 
     18 #invalid_all_none {
     19  text-decoration-upright: all none;
     20 }
     21 
     22 #invalid_none_digits {
     23  text-decoration-upright: none digits;
     24 }
     25 
     26 #invalid_digits_bar {
     27  text-decoration-upright: digits bar;
     28 }
     29 
     30 #invalid_digits_4_none {
     31  text-decoration-upright: digits 4 none;
     32 }
     33 
     34 #invalid_digits2 {
     35  text-decoration-upright: digits2;
     36 }
     37 
     38 #invalid_digits_1 {
     39  text-decoration-upright: digits 1;
     40 }
     41 
     42 #invalid_digits_positive5 {
     43  text-decoration-upright: digits +5;
     44 }
     45 
     46 #invalid_digits_2_00 {
     47  text-decoration-upright: digits 2.00;
     48 }
     49 
     50 #invalid_digits_2_e_0 {
     51  text-decoration-upright: digits 2e0;
     52 }
     53 
     54 #invalid_digits_positive2_e_0 {
     55  text-decoration-upright: digits +2e0;
     56 }
     57 
     58 #invalid_digits_3_e_positive0 {
     59  text-decoration-upright: digits 3e+0;
     60 }
     61 
     62 #invalid_digits_3_e_negative0 {
     63  text-decoration-upright: digits 3e-0;
     64 }
     65 
     66 #invalid_digits_positive4_e_positive0 {
     67  text-decoration-upright: digits +4e+0;
     68 }
     69 
     70 #invalid_digits_positive4_e_negative0 {
     71  text-decoration-upright: digits +4e-0;
     72 }
     73 </style>
     74 </head>
     75 <body>
     76 
     77 <div id="invalid_foo"></div>
     78 <div id="invalid_all_none"></div>
     79 <div id="invalid_none_digits"></div>
     80 <div id="invalid_digits_bar"></div>
     81 <div id="invalid_digits_4_none"></div>
     82 <div id="invalid_digits2"></div>
     83 <div id="invalid_digits_1"></div>
     84 <div id="invalid_digits_positive5"></div>
     85 <div id="invalid_digits_2_00"></div>
     86 <div id="invalid_digits_2_e_0"></div>
     87 <div id="invalid_digits_positive2_e_0"></div>
     88 <div id="invalid_digits_3_e_positive0"></div>
     89 <div id="invalid_digits_3_e_negative0"></div>
     90 <div id="invalid_digits_positive4_e_positive0"></div>
     91 <div id="invalid_digits_positive4_e_negative0"></div>
     92 
     93 <div id="log"></div>
     94 
     95 <script>
     96 var getComputedValueFor = function (id) {
     97  var element = document.getElementById(id);
     98  return window.getComputedStyle(element).textCombineUpright;
     99 };
    100 
    101 test(function () {
    102  assert_equals(getComputedValueFor('invalid_foo'), 'none');
    103 }, 'Computed value for `text-combine-upright: foo` is `none`');
    104 
    105 test(function () {
    106  assert_equals(getComputedValueFor('invalid_all_none'), 'none');
    107 }, 'Computed value for `text-combine-upright: all none` is `none`');
    108 
    109 test(function () {
    110  assert_equals(getComputedValueFor('invalid_none_digits'), 'none');
    111 }, 'Computed value for `text-combine-upright: none digits` is `none`');
    112 
    113 test(function () {
    114  assert_equals(getComputedValueFor('invalid_digits_bar'), 'none');
    115 }, 'Computed value for `text-combine-upright: digits bar` is `none`');
    116 
    117 test(function () {
    118  assert_equals(getComputedValueFor('invalid_digits_4_none'), 'none');
    119 }, 'Computed value for `text-combine-upright: digits 4 none` is `none`');
    120 
    121 test(function () {
    122  assert_equals(getComputedValueFor('invalid_digits2'), 'none');
    123 }, 'Computed value for `text-combine-upright: digits2` is `none`');
    124 
    125 test(function () {
    126  assert_equals(getComputedValueFor('invalid_digits_1'), 'none');
    127 }, 'Computed value for `text-combine-upright: digits 1` is `none`');
    128 
    129 test(function () {
    130  assert_equals(getComputedValueFor('invalid_digits_positive5'), 'none');
    131 }, 'Computed value for `text-combine-upright: digits +5` is `none`');
    132 
    133 test(function () {
    134  assert_equals(getComputedValueFor('invalid_digits_2_00'), 'none');
    135 }, 'Computed value for `text-combine-upright: digits 2.00` is `none`');
    136 
    137 test(function () {
    138  assert_equals(getComputedValueFor('invalid_digits_2_e_0'), 'none');
    139  assert_not_equals(getComputedValueFor('invalid_digits_2_e_0'), 'digits 2');
    140 }, 'Computed value for `text-combine-upright: digits 2e0` is not `digits 2` but `none`');
    141 
    142 test(function () {
    143  assert_equals(getComputedValueFor('invalid_digits_positive2_e_0'), 'none');
    144  assert_not_equals(getComputedValueFor('invalid_digits_positive2_e_0'), 'digits 2');
    145 }, 'Computed value for `text-combine-upright: digits +2e0` is not `digits 2` but `none`');
    146 
    147 test(function () {
    148  assert_equals(getComputedValueFor('invalid_digits_3_e_positive0'), 'none');
    149  assert_not_equals(getComputedValueFor('invalid_digits_3_e_positive0'), 'digits 3');
    150 }, 'Computed value for `text-combine-upright: digits 3e+0` is not `digits 3` but `none`');
    151 
    152 test(function () {
    153  assert_equals(getComputedValueFor('invalid_digits_3_e_negative0'), 'none');
    154  assert_not_equals(getComputedValueFor('invalid_digits_3_e_negative0'), 'digits 3');
    155 }, 'Computed value for `text-combine-upright: digits 3e-0` is not `digits 3` but `none`');
    156 
    157 test(function () {
    158  assert_equals(getComputedValueFor('invalid_digits_positive4_e_positive0'), 'none');
    159  assert_not_equals(getComputedValueFor('invalid_digits_positive4_e_positive0'), 'digits 4');
    160 }, 'Computed value for `text-combine-upright: digits +4e+0` is not `digits 4` but `none`');
    161 
    162 test(function () {
    163  assert_equals(getComputedValueFor('invalid_digits_positive4_e_negative0'), 'none');
    164  assert_not_equals(getComputedValueFor('invalid_digits_positive4_e_negative0'), 'digits 4');
    165 }, 'Computed value for `text-combine-upright: digits +4e-0` is not `digits 4` but `none`');
    166 </script>
    167 </body>
    168 </html>