tor-browser

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

appearance-property.html (1204B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Property references to `appearance`</title>
      6  <link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching">
      7  <script src="/resources/testharness.js"></script>
      8  <script src="/resources/testharnessreport.js"></script>
      9 </head>
     10 <body>
     11 <script>
     12 function create(initialValue) {
     13  var style = document.createElement('input').style;
     14 
     15  style.setProperty('appearance', initialValue);
     16 
     17  return style;
     18 }
     19 
     20 test(function() {
     21  var style = create('');
     22 
     23  style.setProperty('appearance', 'none');
     24 
     25  assert_equals(style.appearance, 'none');
     26 }, 'setProperty');
     27 
     28 test(function() {
     29  var style = create('none');
     30 
     31  style.removeProperty('appearance');
     32 
     33  assert_equals(style.appearance, '');
     34 }, 'removeProperty');
     35 
     36 test(function() {
     37  var style = create('');
     38 
     39  style['appearance'] = 'none';
     40 
     41  assert_equals(style.appearance, 'none');
     42 }, 'property assignment');
     43 
     44 test(function() {
     45  var style = create('none');
     46 
     47  assert_equals(style.getPropertyValue('appearance'), 'none');
     48 }, 'getPropertyValue');
     49 
     50 test(function() {
     51  var style = create('none');
     52 
     53  assert_equals(style['appearance'], 'none');
     54 }, 'property access');
     55 </script>
     56 </body>