forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
/
test_bug438519.html
44 lines (36 loc) · 1.26 KB
/
test_bug438519.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!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>