diff options
Diffstat (limited to 'testing/web-platform/tests/editing/other/inserttext-after-bold-in-font-face-monospace.html')
-rw-r--r-- | testing/web-platform/tests/editing/other/inserttext-after-bold-in-font-face-monospace.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/other/inserttext-after-bold-in-font-face-monospace.html b/testing/web-platform/tests/editing/other/inserttext-after-bold-in-font-face-monospace.html new file mode 100644 index 0000000000..cc937f28f8 --- /dev/null +++ b/testing/web-platform/tests/editing/other/inserttext-after-bold-in-font-face-monospace.html @@ -0,0 +1,32 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> +<div contenteditable><div><br></div></div> +<script> +"use strict"; + +const editingHost = document.querySelector("div[contenteditable]"); +test(() => { + editingHost.focus(); + document.execCommand("fontName", false, "monospace"); + document.execCommand("insertText", false, "abc"); + document.execCommand("insertParagraph"); + document.execCommand("insertText", false, "def "); + document.execCommand("bold"); + document.execCommand("insertText", false, "g"); + assert_in_array( + editingHost.querySelector("div + div").innerHTML, + [ + '<font face="monospace">def <b>g</b></font>', + '<font face="monospace">def <b>g<br></b></font>', + ] + ); +}, ""); +</script> +</body> +</html> |