tor-browser

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

test_new_document_wrapper_preservation.js (385B)


      1 function run_test() {
      2  function init() {
      3    var xmldoc = (new DOMParser()).parseFromString("<foo><bar>stuff</bar></foo>", "text/xml");
      4    xmldoc._test = true;
      5    return xmldoc.evaluate("foo/bar", xmldoc , null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
      6  }
      7 
      8  let node = init();
      9  Cu.forceGC();
     10  Assert.ok(node.ownerDocument._test, "_test param survives GC");
     11 }