tor-browser

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

browser_rules_keyframeLineNumbers.js (763B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 // Test that editing a rule will update the line numbers of subsequent
      7 // rules in the rule view.
      8 
      9 const TESTCASE_URI = URL_ROOT + "doc_keyframeLineNumbers.html";
     10 
     11 add_task(async function () {
     12  await addTab(TESTCASE_URI);
     13  const { inspector, view } = await openRuleView();
     14  await selectNode("#outer", inspector);
     15 
     16  info("Insert a new property, which will affect the line numbers");
     17  await addProperty(view, 1, "font-size", "72px");
     18 
     19  await selectNode("#inner", inspector);
     20 
     21  const value = getRuleViewLinkTextByIndex(view, 3);
     22  // Note that this is relative to the <style>.
     23  is(value.slice(-3), ":27", "rule line number is 27");
     24 });