tor-browser

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

test_bug597784.html (1143B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=597784
      5 -->
      6 <head>
      7  <title>Test for Bug 597784</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.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=597784">Mozilla Bug 597784</a>
     14 <p id="display"></p>
     15 <div id="content"></div>
     16 <pre id="test">
     17 <script type="application/javascript">
     18 
     19 /** Test for Bug 597784 */
     20 
     21 SimpleTest.waitForExplicitFinish();
     22 addLoadEvent(function() {
     23  document.designMode = "on";
     24  var content = document.getElementById("content");
     25  getSelection().collapse(content, 0);
     26  var html = "<test:tag>test:tag</test:tag>" +
     27             "<a href=\"http://mozilla.org/\" test:attr=\"test:attr\" custom=\"value\">link</a>";
     28  document.execCommand("insertHTML", false, html);
     29  is(content.innerHTML, html,
     30     "The custom tags and attributes should be inserted into the document using the insertHTML command");
     31  SimpleTest.finish();
     32 });
     33 
     34 </script>
     35 </pre>
     36 </body>
     37 </html>