tor-browser

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

test_setPropertyWithNull.html (1314B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=830260
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 830260</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="application/javascript">
     12 
     13  /** Test for Bug 830260 */
     14    var div = document.createElement("div");
     15    div.style.color = "green";
     16    div.style.color = "null";
     17    is(div.style.color, "green", 'Assigning "null" as a color should not parse');
     18    div.style.setProperty("color", "null");
     19    is(div.style.color, "green",
     20       'Passing "null" as a color to setProperty should not parse');
     21 
     22    div.style.setProperty("color", null);
     23    is(div.style.color, "",
     24       'Passing null as a color to setProperty should remove the property');
     25 
     26    div.style.color = "green";
     27    is(div.style.color, "green", 'Assigning "green" as a color should parse');
     28 
     29    div.style.color = null;
     30    is(div.style.color, "",
     31       'Assigning null as a color should remove the property');
     32 
     33 
     34 
     35 
     36  </script>
     37 </head>
     38 <body>
     39 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=830260">Mozilla Bug 830260</a>
     40 <p id="display"></p>
     41 <div id="content" style="display: none">
     42 
     43 </div>
     44 <pre id="test">
     45 </pre>
     46 </body>
     47 </html>