Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/white-space/pre-line-br-with-whitespace-child-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Text Test: Chrome pre-line crash test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
br { white-space: pre-line }
</style>
<script>
test(() => {
document.documentElement.remove();
const br = document.createElement("br");
br.appendChild(document.createTextNode(""));
document.appendChild(br);
br.offsetTop;
br.firstChild.data = " ";
}, "Modifying data of a text child of a root br element with pre-line should not crash.");
</script>