Index: LayoutTests/fast/parser/execute-script-during-adoption-agency-removal.html |
diff --git a/LayoutTests/fast/parser/execute-script-during-adoption-agency-removal.html b/LayoutTests/fast/parser/execute-script-during-adoption-agency-removal.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c0df9020e3884c1dfa771ccde194d6f218965a5 |
--- /dev/null |
+++ b/LayoutTests/fast/parser/execute-script-during-adoption-agency-removal.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<script id="firstScript" type="invalid"> |
+ // When this script runs p.parentNode == null because we're in the middle of |
+ // an HTMLConstructionSite::insert() task from the adoption agency. |
+ s.appendChild(p); |
+</script> |
+<b> |
+ <p id="paragraph"> |
+ <script> |
+ p = document.getElementById("paragraph"); |
+ s = document.getElementById("firstScript"); |
+ s.appendChild(p); |
+ s.type = ""; |
+ </script> |
+ <!-- End tag omitted for implicit close --> |
+</b> |
+<script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ p.remove(); |
+ var p = document.querySelector("p"); |
+ if (p) { |
+ document.body.textContent = "FAIL, " + p.tagName + " has parentNode = " + p.parentNode; |
+ } else { |
+ document.body.textContent = "PASS"; |
+ } |
+</script> |