Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html

Issue 1277793002: parserRemoveChild: Avoid unintended DOM modifications after user script run (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add tests Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/parser/scriptexec-during-parserRemoveChild-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html
diff --git a/LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html b/LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html
new file mode 100644
index 0000000000000000000000000000000000000000..c27495d916570dbf06a7dbf2345533c61c6e48d3
--- /dev/null
+++ b/LayoutTests/fast/parser/scriptexec-during-parserRemoveChild.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<body>
+<b><p><iframe src="javascript:onunload = function() {
+ if(!top.container) {
+ top.container = document.createElement('div');
+ top.container.appendChild(frameElement.parentNode);
+ }
+}"></iframe></b></p><!-- This order is intentional to force reparenting of iframe -->
+<script>
+description("Ensure that iframe onunload event handler triggered during reparenting that modifies the reparented DOM doesn't corrupt DOM.")
+var iframe = document.querySelector("iframe");
+shouldBe("iframe", "iframe.parentNode.firstChild");
+var parentNode = iframe.parentNode;
+shouldBe("parentNode", "parentNode.parentNode.firstChild");
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/parser/scriptexec-during-parserRemoveChild-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698