gecko-dev/content/base/test/test_bug438519.html

45 строки
1.3 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=438519
-->
<head>
<title>Test for Bug 438519</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="doTest()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=438519">Mozilla Bug 438519</a>
<p id="display"></p>
<div id="content" style="display:none">
<iframe id="empty" src="data:text/xml,<!DOCTYPE HTML []><html></html>"></iframe>
<iframe id="missing" src="data:text/xml,<!DOCTYPE HTML><html></html>"></iframe>
<iframe id="entity" src="data:text/xml,<!DOCTYPE HTML [ <!ENTITY foo 'foo'> ]><html></html>"></iframe>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test for Bug 218236 **/
SimpleTest.waitForExplicitFinish();
function doTest() {
function checkInternalSubset(id, expected) {
var e = document.getElementById(id);
is(e.contentDocument.doctype.internalSubset, expected, "checking '" + id + "'");
}
checkInternalSubset("empty", "");
checkInternalSubset("missing", null);
checkInternalSubset("entity", " <!ENTITY foo 'foo'> ");
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>