tor-browser

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

browser_rules_add-property-svg.js (621B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Tests editing SVG styles using the rules view.
      7 
      8 var TEST_URL = URL_ROOT + "doc_alert.svg";
      9 var TEST_SELECTOR = "path";
     10 
     11 add_task(async function () {
     12  await addTab(TEST_URL);
     13  const { inspector, view } = await openRuleView();
     14  await selectNode(TEST_SELECTOR, inspector);
     15 
     16  info("Test creating a new property");
     17  await addProperty(view, 0, "fill", "red");
     18 
     19  is(
     20    await getComputedStyleProperty(TEST_SELECTOR, null, "fill"),
     21    "rgb(255, 0, 0)",
     22    "The fill was changed to red"
     23  );
     24 });