content/base/test/test_bug811701.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=811701
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 811701</title>
     9   <script type="application/javascript" 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=811701">Mozilla Bug 811701</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    16 <math><mtext>test</mtext></math>
    17 <svg><polygon points="0,0 100,100 200,300"/></svg>
    18 </div>
    19 <pre id="test">
    20 </pre>
    21   <script type="application/javascript">
    23   /** Test for Bug 811701 **/
    24   var math = document.querySelector("math");
    25   is(math.innerHTML, "<mtext>test</mtext>", "<math> should have innerHTML");
    26   is(math.outerHTML, "<math><mtext>test</mtext></math>",
    27      "<math> should have innerHTML");
    28   math.innerHTML = "<mo>+</mo>";
    29   is(math.firstChild.namespaceURI, "http://www.w3.org/1999/xhtml",
    30      "Should have the right namespace after setting innerHTML on <math>");
    32   var polygon = document.querySelector("polygon");
    33   is(polygon.parentNode.innerHTML,
    34      '<polygon points="0,0 100,100 200,300"></polygon>',
    35      "<svg> should have innerHTML");
    36   is(polygon.parentNode.outerHTML,
    37      '<svg><polygon points="0,0 100,100 200,300"></polygon></svg>',
    38      "<svg> should have outerHTML");
    39   is(polygon.outerHTML, '<polygon points="0,0 100,100 200,300"></polygon>',
    40      "<polygon> should have outerHTML");
    42   var svg = document.querySelector("svg");
    43   svg.innerHTML = "<rect/>";
    44   is(svg.firstChild.namespaceURI, "http://www.w3.org/1999/xhtml",
    45      "Should have the right namespace after setting innerHTML on <math>");
    46   </script>
    47 </body>
    48 </html>

mercurial