Skip to content

Commit

Permalink
Bug 1345015 - Part 3. Add crash test. r=masayuki
Browse files Browse the repository at this point in the history
Add minimal crash test for this.  When removing a line, this doesn't occur.

MozReview-Commit-ID: JqS2E8q47ML

--HG--
extra : rebase_source : 322a77cbc49e29bbd6b705650485634dd4801b8b
  • Loading branch information
makotokato committed Jun 19, 2017
1 parent 80cc72a commit 86506e2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions editor/libeditor/crashtests/1345015.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<script type="application/javascript">
document.designMode = "on";
let selection = window.getSelection();

let foo = document.createElement('foo');
let div = document.createElement('div');
document.documentElement.appendChild(foo);
document.documentElement.appendChild(div);
foo.outerHTML = '<foo>';

let range = document.createRange();
range.selectNode(div);
selection.addRange(range);
range.setStart(foo, 0);

range = document.createRange();
range.selectNode(document.documentElement);
selection.addRange(range);

document.execCommand('insertparagraph', false, null);
</script>
</head>
<body>
</body>
</html>
1 change: 1 addition & 0 deletions editor/libeditor/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ load 1317704.html
load 1317718.html
load 1324505.html
needs-focus load 1343918.html
load 1345015.html
load 1348851.html
load 1350772.html
load 1366176.html
Expand Down

0 comments on commit 86506e2

Please sign in to comment.