test_bug789315.html (1325B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=789315 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 789315</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 <script type="text/javascript"> 12 (function() { 13 const observerConfig = { 14 childList: true, 15 }; 16 17 var observer = new MutationObserver(onMutations); 18 observer.observe(document.head, observerConfig); 19 20 function onMutations(mutations) { 21 for (var i in mutations) { 22 var mutation = mutations[i]; 23 for (var j in mutation.addedNodes) { 24 var addedNode = mutation.addedNodes[j]; 25 addedNode.mutationObserverHasNotified = true; 26 } 27 } 28 } 29 30 })(); 31 </script> 32 33 <link id="testnode" rel="localization" href="dummy"></link> 34 35 <script type="text/javascript"> 36 var testNode = document.getElementById("testnode"); 37 ok(testNode.mutationObserverHasNotified); 38 </script> 39 </head> 40 <body> 41 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789315">Mozilla Bug 789315</a> 42 <p id="display"></p> 43 <div id="content" style="display: none"> 44 45 </div> 46 <pre id="test"> 47 </pre> 48 </body> 49 </html>