tor-browser

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

text-combine-upright-parsing-valid-001.html (2406B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Writing Modes: parsing text-combine-upright with valid 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-3/#text-combine-upright">
      8 <meta name="assert" content="text-combine-upright supports `none`, `all`, `digits`, and `digits` followed by a digit in the range from 2 to 4.">
      9 <meta name="flags" content="dom">
     10 <script src="/resources/testharness.js"></script>
     11 <script src="/resources/testharnessreport.js"></script>
     12 
     13 <style>
     14 #valid_none {
     15  text-combine-upright: none;
     16 }
     17 
     18 #valid_all {
     19  text-combine-upright: all;
     20 }
     21 
     22 #valid_initial {
     23  text-combine-upright: initial;
     24 }
     25 
     26 #valid_inherit_outer {
     27  text-combine-upright: all;
     28 }
     29 
     30 #valid_inherit_inner {
     31  text-combine-upright: inherit;
     32 }
     33 
     34 #valid_unset_outer {
     35  text-combine-upright: all;
     36 }
     37 
     38 #valid_unset_inner {
     39  text-combine-upright: unset;
     40 }
     41 </style>
     42 </head>
     43 <body>
     44 
     45 <div id="valid_none"></div>
     46 <div id="valid_all"></div>
     47 
     48 <div id="valid_initial"></div>
     49 
     50 <div id="valid_inherit_outer">
     51  <div id="valid_inherit_inner"></div>
     52 </div>
     53 
     54 <div id="valid_unset_outer">
     55  <div id="valid_unset_inner"></div>
     56 </div>
     57 
     58 <div id="log"></div>
     59 
     60 <script>
     61 var getComputedValueFor = function (id) {
     62  var element = document.getElementById(id);
     63  return window.getComputedStyle(element).textCombineUpright;
     64 };
     65 
     66 test(function () {
     67  assert_equals(getComputedValueFor('valid_none'), 'none');
     68 }, 'Computed value for `text-combine-upright: none` is `none`');
     69 
     70 test(function () {
     71  assert_equals(getComputedValueFor('valid_all'), 'all');
     72 }, 'Computed value for `text-combine-upright: all` is `all`');
     73 
     74 
     75 test(function () {
     76  assert_equals(getComputedValueFor('valid_initial'), 'none');
     77 }, 'Computed value for `text-combine-upright: initial` is `none`');
     78 
     79 
     80 test(function () {
     81  assert_equals(getComputedValueFor('valid_inherit_outer'), 'all');
     82  assert_equals(getComputedValueFor('valid_inherit_inner'), 'all');
     83 }, 'Computed value for `text-combine-upright: inherit` is `all` which is inherited from the parent element');
     84 
     85 test(function () {
     86  assert_equals(getComputedValueFor('valid_unset_outer'), 'all');
     87  assert_equals(getComputedValueFor('valid_unset_inner'), 'all');
     88 }, 'Computed value for `text-combine-upright: unset` is `all` which is inherited from the parent element');
     89 </script>
     90 </body>
     91 </html>