tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 89f71077fd95c3a544507a71dd8fe4ae297a4519
parent 4cd3d2c3afdded7272cc6e506b4f896662a75237
Author: Simon Wülker <simon.wuelker@arcor.de>
Date:   Sat, 22 Nov 2025 21:11:50 +0000

Bug 2001418 [wpt PR 56149] - script: Don't crash when encountering unexpected node types in `Range::createContextualFragment`, a=testonly

Automatic update from web-platform-tests
Add crashtest

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

--
test tidy fixes

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

--

wpt-commits: a8728be01f075e232e84087cb0ae1d1ad0c7ef09, 0a8d6f099611b768814d511da3f0b487cd16eecb
wpt-pr: 56149

Diffstat:
Atesting/web-platform/tests/html/syntax/serializing-html-fragments/range-on-pi-contextual-fragment-crash.html | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/html/syntax/serializing-html-fragments/range-on-pi-contextual-fragment-crash.html b/testing/web-platform/tests/html/syntax/serializing-html-fragments/range-on-pi-contextual-fragment-crash.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<head> + <title>createContextualFragment should not crash when the end node is a processing instruction</title> + <link rel="author" title="Simon Wülker" href="mailto:simon.wuelker@arcor.de"> + <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-range-createcontextualfragment"> + <link rel="help" href="https://github.com/servo/servo/issues/40719"> +</head> +<body> + <script> + let pi = document.createProcessingInstruction("xml-stylesheet", 'href="mycss.css" type="text/css"'); + let range = document.createRange(); + range.setEnd(pi, 0) + range.createContextualFragment("<div>A</div>"); + </script> +</body>