| Index: third_party/WebKit/LayoutTests/dom/document/adoptNode-reparenting-crash.html
|
| diff --git a/third_party/WebKit/LayoutTests/dom/document/adoptNode-reparenting-crash.html b/third_party/WebKit/LayoutTests/dom/document/adoptNode-reparenting-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a8691dddc8964fd994cdbc4e5d4f2ffa0ef62665
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/dom/document/adoptNode-reparenting-crash.html
|
| @@ -0,0 +1,22 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<div id="test-container"><script>
|
| +var sacrifice;
|
| +test(() => {
|
| + let testContainer = document.getElementById('test-container');
|
| + let iframe = document.createElement('iframe');
|
| + testContainer.appendChild(iframe);
|
| + let doc = iframe.contentDocument;
|
| + let script = doc.createElementNS('http://www.w3.org/2000/svg', 'script');
|
| + script.type = 'invalid-type';
|
| + script.textContent = 'document.body.appendChild(parent.sacrifice)';
|
| + sacrifice = document.createElement('div');
|
| + script.appendChild(sacrifice);
|
| + doc.body.appendChild(script);
|
| + script.type = '';
|
| + // adoptNode() calls script.removeNode(sacrifice) internally, and this DOM
|
| + // mutation kicks the script.
|
| + document.adoptNode(sacrifice);
|
| +}, 'Reparenting in removeNode() in adoptNode() should not crash.');
|
| +</script>
|
|
|