tor-browser

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

test_constructable_stylesheets_chrome_only_rules_in_content.html (863B)


      1 <!DOCTYPE HTML>
      2 <meta charset="utf-8">
      3 <title>Test for chrome-only rules in constructable stylesheets (in content)</title>
      4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5 <script>
      6  add_task(async function chrome_rules_constructable_stylesheets_in_content() {
      7    let sheet = new CSSStyleSheet();
      8    sheet.replaceSync(".foo { -moz-default-appearance: none }");
      9    is(sheet.cssRules[0].style.length, 0, "Should not parse chrome-only property in content  document");
     10  });
     11 
     12  add_task(async function chrome_rules_constructable_stylesheets_in_content() {
     13    let sheet = new CSSStyleSheet({ baseURL: "chrome://browser/content/browser.xhtml" })
     14    sheet.replaceSync(".foo { -moz-default-appearance: none }");
     15    is(sheet.cssRules[0].style.length, 0, "Should not parse chrome-only property in content  document, even with chrome baseURL");
     16  });
     17 </script>