summaryrefslogtreecommitdiffstats
path: root/dom/base/test/test_bug1784187.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/test/test_bug1784187.html')
-rw-r--r--dom/base/test/test_bug1784187.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/dom/base/test/test_bug1784187.html b/dom/base/test/test_bug1784187.html
new file mode 100644
index 0000000000..6f9f782e3e
--- /dev/null
+++ b/dom/base/test/test_bug1784187.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1784187
+-->
+<head>
+ <title>Test for Bug 1784187</title>
+ <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+ <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>
+