tor-browser

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

browser_rules_inline-source-map.js (714B)


      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 when a source map comment appears in an inline stylesheet, the
      7 // rule-view still appears correctly.
      8 // Bug 1255787.
      9 
     10 const TESTCASE_URI = URL_ROOT + "doc_inline_sourcemap.html";
     11 const PREF = "devtools.source-map.client-service.enabled";
     12 
     13 add_task(async function () {
     14  Services.prefs.setBoolPref(PREF, true);
     15 
     16  await addTab(TESTCASE_URI);
     17  const { inspector, view } = await openRuleView();
     18 
     19  await selectNode("div", inspector);
     20 
     21  const ruleEl = getRuleViewRule(view, "div");
     22  ok(ruleEl, "The 'div' rule exists in the rule-view");
     23 
     24  Services.prefs.clearUserPref(PREF);
     25 });