tor-browser

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

test_bug502091.html (1053B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=502091
      5 
      6 Adding a <meta> element by writing to innerHTML should work correctly.
      7 -->
      8 <head>
      9  <title>Test for Bug 502091</title>
     10  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     11  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     12 </head>
     13 <body>
     14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=502091">Mozilla Bug 502091</a>
     15 <p id="display"></p>
     16 <div id="content" style="display: none">
     17 
     18 </div>
     19 <div id="test">
     20 <script class="testbody" type="text/javascript">
     21  function $(id) { return document.getElementById(id); }
     22 
     23  var iframe = document.createElement("iframe");
     24  iframe.setAttribute("id", "iframe");
     25  iframe.src = "bug_502091_iframe.html";
     26  iframe.onload = function() {
     27    var div = $("iframe").contentDocument.getElementById("testdiv");
     28    var meta = div.getElementsByTagName("meta");
     29    is(meta.length, 1, "meta element not added to div");
     30  };
     31  $("test").appendChild(iframe);
     32 
     33 </script>
     34 </div>
     35 </body>
     36 </html>