tor-browser

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

test_bug761120.html (1055B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=761120
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 761120</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=761120">Mozilla Bug 761120</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none">
     16  
     17 </div>
     18 <pre id="test">
     19 <script type="application/javascript">
     20 /** Test for Bug 761120 */
     21 var doc = document.implementation.createHTMLDocument("title");
     22 try {
     23  doc.appendChild(doc.createTextNode("text"));
     24  ok(false, "Didn't throw");
     25 } catch (e) {
     26  is(e.name, "HierarchyRequestError");
     27 }
     28 
     29 var el = document.createElement("div");
     30 var text = document.createTextNode("text");
     31 el.appendChild(text);
     32 is(el.firstChild, text);
     33 
     34 var df = document.createDocumentFragment();
     35 text = document.createTextNode("text");
     36 df.appendChild(text);
     37 is(df.firstChild, text);
     38 </script>
     39 </pre>
     40 </body>
     41 </html>