mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
replaceWith <document> in a cycle should not panic
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
7
tests/wpt/meta/MANIFEST.json
vendored
7
tests/wpt/meta/MANIFEST.json
vendored
@@ -7739,6 +7739,13 @@
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"replaceWith-document-element-crash.html": [
|
||||
"299542341ad27da315951f7863c3f0198e2ecfcb",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ranges": {
|
||||
|
||||
10
tests/wpt/tests/dom/nodes/replaceWith-document-element-crash.html
vendored
Normal file
10
tests/wpt/tests/dom/nodes/replaceWith-document-element-crash.html
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta name="assert" content="Test replaceWith in a cycle">
|
||||
<link rel=help href="https://github.com/servo/servo/issues/35698">
|
||||
<link rel="author" title="Euclid Ye" href="mailto:yezhizhenjiakang@gmail.com">
|
||||
<script>
|
||||
var oldRoot = document.documentElement;
|
||||
var newRoot = document.createElement("html");
|
||||
oldRoot.replaceWith(newRoot);
|
||||
newRoot.replaceWith(oldRoot);
|
||||
</script>
|
||||
Reference in New Issue
Block a user