Add crashtest
authorjruderman@hmc.edu
Fri, 14 Dec 2007 21:15:50 -0800
changeset 9116 270e31bdb83420ec132495f36bc4fce57ef4d046
parent 9115 346ce118b48ab5770d6562e1984ce122baaeb4be
child 9117 1fbfd4364c334ba127d3c39e38b264b8d2f51fde
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherderautoland@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9b3pre
Add crashtest
editor/libeditor/html/crashtests/382778-1.html
editor/libeditor/html/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/html/crashtests/382778-1.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+
+function init1()
+{
+  // Create an html:iframe in HTML mode (so designMode can be used 320092)
+  targetIframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
+  targetIframe.src = "data:text/html,";
+  targetIframe.setAttribute("style", "width: 700px; height: 500px; border: 1px dotted green;");
+  document.body.appendChild(targetIframe);
+  
+  setTimeout(init2, 100);
+}
+
+
+function init2()
+{
+  targetWindow = targetIframe.contentWindow;
+  targetDocument = targetWindow.document;
+  
+  p = document.getElementById("p");
+  pText = p.firstChild;
+
+  targetDocument.body.appendChild(targetDocument.adoptNode(p, true));
+
+  targetDocument.designMode = 'on';
+
+  setTimeout(boom, 100);
+}
+
+
+function boom()
+{
+  var rng = targetDocument.createRange(); 
+  rng.setStart(pText, 3);
+  rng.setEnd(pText, 3);
+  
+  targetWindow.getSelection().addRange(rng); 
+
+  targetDocument.execCommand("insertorderedlist", false, null);
+  
+  document.documentElement.removeAttribute("class")
+}
+
+</script>
+</head>
+
+<body onload="init1();">
+<p id="p">word word</p>
+</body>
+
+</html>
--- a/editor/libeditor/html/crashtests/crashtests.list
+++ b/editor/libeditor/html/crashtests/crashtests.list
@@ -1,1 +1,2 @@
 load 336081-1.xhtml # asserts (no bug?)
+load 382778-1.html