Index: LayoutTests/fast/dom/MutationObserver/script-append.html |
diff --git a/LayoutTests/fast/dom/MutationObserver/script-end-tag.html b/LayoutTests/fast/dom/MutationObserver/script-append.html |
similarity index 53% |
copy from LayoutTests/fast/dom/MutationObserver/script-end-tag.html |
copy to LayoutTests/fast/dom/MutationObserver/script-append.html |
index 76870ad45c9575ebc1fdb8c1a4030c70790bc69b..2bf9feba445dc2bb80bd9354d94a5faab8f57d3b 100644 |
--- a/LayoutTests/fast/dom/MutationObserver/script-end-tag.html |
+++ b/LayoutTests/fast/dom/MutationObserver/script-append.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<script src="../../../resources/js-test.js"></script> |
<script> |
-description('Test that a script end tags invokes MutationObserver callbacks'); |
+description('Test that an appended script does NOT invoke MutationObserver callbacks'); |
var mutationsDelivered = false; |
function callback(mutations) { |
@@ -13,6 +13,11 @@ var div = document.createElement('div'); |
observer.observe(div, {attributes: true}); |
div.setAttribute('foo', 'bar'); |
shouldBeFalse('mutationsDelivered'); |
-document.write('<script><\/script>'); // performs a microtask checkpoint |
-shouldBeTrue('mutationsDelivered'); |
+var scriptDidRun = false; |
+var script = document.createElement('script'); |
+script.textContent = 'scriptDidRun = true'; |
+shouldBeFalse('scriptDidRun'); |
+document.head.appendChild(script); |
+shouldBeTrue('scriptDidRun'); |
+shouldBeFalse('mutationsDelivered'); |
</script> |