Bug 1375131 - Part 2. Add crash test. r?masayuki draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 23 Jun 2017 16:45:50 +0900
changeset 599487 bb4dc90930f9776acbc3c844c575a8a419aa0131
parent 599486 812f3d9b1da726e6ac881d386c923b8093b92200
child 599488 4d7c0c3a083867de161d9566746b903636797dc4
push id65545
push userm_kato@ga2.so-net.ne.jp
push dateFri, 23 Jun 2017 07:53:00 +0000
reviewersmasayuki
bugs1375131
milestone56.0a1
Bug 1375131 - Part 2. Add crash test. r?masayuki MozReview-Commit-ID: DxYWPNcb7jK
editor/libeditor/crashtests/1375131.html
editor/libeditor/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1375131.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script type="application/javascript">
+      document.designMode = 'on';
+
+      let div = document.createElement('div');
+      let p = document.createElement('p');
+      document.documentElement.appendChild(div);
+      document.documentElement.appendChild(
+        document.createElement('body'));
+      document.documentElement.appendChild(p);
+      document.execCommand('insertimage', false, 'http://localhost/');
+      document.execCommand('insertparagraph', false, null);
+
+      document.elementFromPoint(0, 0);
+
+      let selection = window.getSelection();
+      selection.modify('extend', 'forward', 'character');
+
+      let range = document.createRange();
+      range.selectNode(p);
+      selection.addRange(range);
+      range.setStart(div, 0);
+
+      range = document.createRange();
+      range.selectNode(p);
+      selection.addRange(range);
+
+      document.execCommand('delete', false, null);
+    </script>
+  </head>
+</html>
--- a/editor/libeditor/crashtests/crashtests.list
+++ b/editor/libeditor/crashtests/crashtests.list
@@ -71,8 +71,9 @@ load 1264921.html
 load 1272490.html
 load 1317704.html
 load 1317718.html
 load 1324505.html
 needs-focus load 1343918.html
 load 1348851.html
 load 1350772.html
 load 1366176.html
+load 1375131.html