37 lines
1 KiB
HTML
37 lines
1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1784187
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 1784187</title>
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<script class="testbody" type="text/javascript">
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
function observeTest(mutationsList) {
|
|
for (let mutation of mutationsList) {
|
|
for (let n of mutation.addedNodes) {
|
|
if (n.id === 'content') {
|
|
is(n.innerHTML.trim(), "<script><\/script>", "Comment should not have been observed.");
|
|
SimpleTest.finish();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var observer = new MutationObserver(observeTest);
|
|
observer.observe(document.body, { childList: true, subtree: true });
|
|
</script>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1784187">Mozilla Bug 1784187</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
<script></script>
|
|
<!-- Test comment that shouldn't be observed -->
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|