Title: [201439] trunk/LayoutTests
Revision
201439
Author
[email protected]
Date
2016-05-26 16:40:37 -0700 (Thu, 26 May 2016)

Log Message

DOM mutation methods fail to re-check validity of node insertion after removing nodes from old parent
https://bugs.webkit.org/show_bug.cgi?id=81991
<rdar://problem/11120506>

Reviewed by Chris Dumez.

Add a test case for an old DOM mutation bug that was fixed long ago.

* fast/dom/circular-dom-tree-crash-expected.txt: Added.
* fast/dom/circular-dom-tree-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (201438 => 201439)


--- trunk/LayoutTests/ChangeLog	2016-05-26 23:05:09 UTC (rev 201438)
+++ trunk/LayoutTests/ChangeLog	2016-05-26 23:40:37 UTC (rev 201439)
@@ -1,3 +1,16 @@
+2016-05-26  Brent Fulgham  <[email protected]>
+
+        DOM mutation methods fail to re-check validity of node insertion after removing nodes from old parent
+        https://bugs.webkit.org/show_bug.cgi?id=81991
+        <rdar://problem/11120506>
+
+        Reviewed by Chris Dumez.
+
+        Add a test case for an old DOM mutation bug that was fixed long ago.
+
+        * fast/dom/circular-dom-tree-crash-expected.txt: Added.
+        * fast/dom/circular-dom-tree-crash.html: Added.
+
 2016-05-26  Ryan Haddad  <[email protected]>
 
         Marking js/function-apply.html as a flaky timeout on mac debug wk2

Added: trunk/LayoutTests/fast/dom/circular-dom-tree-crash-expected.txt (0 => 201439)


--- trunk/LayoutTests/fast/dom/circular-dom-tree-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/circular-dom-tree-crash-expected.txt	2016-05-26 23:40:37 UTC (rev 201439)
@@ -0,0 +1,4 @@
+Tests that validity of node insertion is retained after removing nodes from a parent. The test passes if we do not crash and we encounter a HierarchyRequestError.
+
+PASS: Encountered: HierarchyRequestError
+

Added: trunk/LayoutTests/fast/dom/circular-dom-tree-crash.html (0 => 201439)


--- trunk/LayoutTests/fast/dom/circular-dom-tree-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/circular-dom-tree-crash.html	2016-05-26 23:40:37 UTC (rev 201439)
@@ -0,0 +1,40 @@
+<!doctype HTML>
+<html>
+<body _onload_="runTest()">
+<p>Tests that validity of node insertion is retained after removing nodes from a parent. The test passes if we do not crash and we encounter a HierarchyRequestError.</p>
+<div id=first></div>
+<div id=second></div>
+<pre id='logger'></pre>
+<script>
+if (window.testRunner)
+{
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function runTest()
+{
+    var first = document.getElementById('first');
+    var second = document.getElementById('second');
+    second.addEventListener('DOMNodeRemoved', function() {
+        second.appendChild(first);
+    });
+
+    var errorName = 'No errors';
+    try {
+        first.appendChild(second);
+    } catch (error) {
+        errorName = error.name;
+    } finally {
+        var state = 'FAIL';
+        if (errorName == 'HierarchyRequestError')
+            state = 'PASS'
+        document.getElementById('logger').innerHTML += state + ': Encountered: ' + errorName + '\n';
+    }
+
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+</script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to