content/base/test/test_bug438519.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=438519
     5 -->
     6 <head>
     7   <title>Test for Bug 438519</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 </head>
    11 <body onload="doTest()">
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=438519">Mozilla Bug 438519</a>
    13 <p id="display"></p>
    14 <div id="content" style="display:none">
    16 <iframe id="empty" src="data:text/xml,<!DOCTYPE HTML []><html></html>"></iframe>
    17 <iframe id="missing" src="data:text/xml,<!DOCTYPE HTML><html></html>"></iframe>
    18 <iframe id="entity" src="data:text/xml,<!DOCTYPE HTML [ <!ENTITY foo 'foo'> ]><html></html>"></iframe>
    20 </div>
    21 <pre id="test">
    22 <script class="testbody" type="text/javascript">
    24 /** Test for Bug 218236 **/
    26 SimpleTest.waitForExplicitFinish();
    28 function doTest() {
    29   function checkInternalSubset(id, expected) {
    30     var e = document.getElementById(id);
    31     is(e.contentDocument.doctype.internalSubset, expected, "checking '" + id + "'");
    32   }
    34   checkInternalSubset("empty", "");
    35   checkInternalSubset("missing", null);
    36   checkInternalSubset("entity", " <!ENTITY foo 'foo'> ");
    37   SimpleTest.finish();
    38 }
    40 </script>
    41 </pre>
    42 </body>
    43 </html>

mercurial