content/base/test/test_bug545644.xhtml

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 xmlns="http://www.w3.org/1999/xhtml">
     3 <!--
     4 -->
     5 <head>
     6   <title>Test for XHTML serializer + innerHtml, bug 545644</title>
     7   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     8   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     9 </head>
    10 <body>
    11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=545644">Mozilla Bug </a>
    12 <p id="display"></p>
    14 <pre id="test">
    15 <script class="testbody" type="text/javascript">
    17 function testInner () {
    18   var div = document.getElementById("test_inner");
    20     try {
    21       div.innerHTML = "some \u00A0 &amp;nbsp; text";
    22       ok(false, "innerHTML in xhtml", "test failed, no exception by the parser when giving an unexpected entity"+e);
    23     } catch (e) {
    24       ok (true, "innerHTML in xhtml", "test ok");
    25     }
    27     try {
    28       div.innerHTML = "some \u00A0 text";
    29       div.innerHTML += "!";
    30       ok (true, "innerHTML in xhtml", "test ok");
    31     } catch (e) {
    32       ok(false, "innerHTML in xhtml", "test failed, unexpected exception "+e);
    33     }
    35   SimpleTest.finish();
    36 }
    39 SimpleTest.waitForExplicitFinish();
    41 addLoadEvent(testInner);
    43 </script>
    44 </pre>
    45 <div id="test_inner"></div>
    46 </body>
    47 </html>

mercurial