<html>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test((t) => {
let xmlWindow;
t.add_cleanup(() => { xmlWindow.close(); });
function checkSourceXML() {
var sourceXML = xmlWindow.document.getElementById('webkit-xml-viewer-source-xml');
assert_equals(typeof(sourceXML), 'object');
assert_equals(sourceXML.firstChild.nodeName, 'root', 'Content of source XML.');
t.done();
}
window.addEventListener("load", (e) => {
xmlWindow = window.open('resources/sample.xml',
'XMLViewerTestWindow');
xmlWindow.onload = t.step_func(checkSourceXML);
});
}, 'XMLTreeConverted');
</script>
</head>
<body>
</body>
</html>