editor/libeditor/crashtests/1464251.html
author Makoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 09 Aug 2018 08:22:50 +0000
changeset 486267 147cb3ed71f8dc1f24653b4486cecc54c52ad5a1
permissions -rw-r--r--
Bug 1464251 - SplitNodeDeepWithTransaction might create orphan node. r=masayuki SplitStyleAbovePoint calls SplitNodeDeepWithTransaction repeatedly. If SplitNodeDeepWithTransaction creates orphan node like this test case, this crash occurs. So we should check whether node becomes orphan node. Differential Revision: https://phabricator.services.mozilla.com/D1993

<script>
var count = 0;

function go() {
  document.execCommand("delete", false);
}
function eh() {
  count++;
  if (count >= 3) {
    return;
  }
  window.addEventListener("DOMNodeInserted", eh);
  document.execCommand("removeFormat", false);
  document.execCommand("insertText", false, "1");
}
</script>
<body onload=go()>
<ol oninput="eh()" contenteditable="true">
<!-- x -->
<s>
<!-- x -->