tor-browser

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

test_bug1784187.html (1053B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1784187
      5 -->
      6 <head>
      7  <title>Test for Bug 1784187</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     10 </head>
     11 <body>
     12 <script class="testbody" type="text/javascript">
     13 SimpleTest.waitForExplicitFinish();
     14 
     15 function observeTest(mutationsList) {
     16  for (let mutation of mutationsList) {
     17    for (let n of mutation.addedNodes) {
     18      if (n.id === 'content') {
     19        is(n.innerHTML.trim(), "<script><\/script>", "Comment should not have been observed.");
     20        SimpleTest.finish();
     21      }
     22    }
     23  }
     24 }
     25 
     26 var observer = new MutationObserver(observeTest);
     27 observer.observe(document.body, { childList: true, subtree: true });
     28 </script>
     29 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1784187">Mozilla Bug 1784187</a>
     30 <p id="display"></p>
     31 <div id="content" style="display: none">
     32  <script></script>
     33  <!-- Test comment that shouldn't be observed -->
     34 </div>
     35 </body>
     36 </html>