2017-10-23 05:12:09 +03:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1384661
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Test for Bug 1384661</title>
|
2019-04-16 06:53:28 +03:00
|
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
2017-10-23 05:12:09 +03:00
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
|
|
|
/** Test for Bug 1384661 **/
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
|
|
|
function runTest() {
|
|
|
|
for (var p in document) {
|
|
|
|
typeof(document[p]);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Overwrite document
|
|
|
|
var doc = document.implementation.createDocument(null, 'xml', null);
|
|
|
|
doc.load("");
|
|
|
|
var str = new XMLSerializer().serializeToString(doc);
|
|
|
|
document.write(str);
|
|
|
|
|
|
|
|
// Check if childNodes of overwritten document is changed accordingly
|
|
|
|
is(document.childNodes.length, 0,
|
|
|
|
"childNodes.length of overwritten document should be 0");
|
|
|
|
is(document.childNodes[0], undefined,
|
|
|
|
"childNodes[0] of overwritten document should be undefined");
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body onload="runTest()">
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1384661">Mozilla Bug 1384661</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|