Add tests
authorJesse Ruderman <jruderman@gmail.com>
Sun, 26 Apr 2009 23:32:41 -0700
changeset 27863 ea128fc02710512e631242260a87081be5e4837b
parent 27862 8db104e9d02463129b382d0e26ffa5c3d482eedc
child 27864 245a31c63269dbe4335818a0c3fad7d18a4ea8b5
push idunknown
push userunknown
push dateunknown
milestone1.9.2a1pre
Add tests
content/xul/templates/src/crashtests/330010-1.rdf
content/xul/templates/src/crashtests/330010-1.xul
content/xul/templates/src/crashtests/crashtests.list
layout/base/crashtests/387195-2.xhtml
layout/base/crashtests/467881-1.html
layout/base/crashtests/crashtests.list
layout/reftests/bidi/381279-1-ref.html
layout/reftests/bidi/381279-1.html
layout/reftests/bidi/reftest.list
new file mode 100644
--- /dev/null
+++ b/content/xul/templates/src/crashtests/330010-1.rdf
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:s="urn:croczilla:xulsvg1:">
+  <rdf:Description about="urn:root">
+    <s:shapes>
+      <rdf:Bag>
+        <rdf:li>
+          <rdf:Description />
+        </rdf:li>
+      </rdf:Bag>
+    </s:shapes>
+ </rdf:Description>
+</rdf:RDF>
new file mode 100644
--- /dev/null
+++ b/content/xul/templates/src/crashtests/330010-1.xul
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        xmlns:svg="http://www.w3.org/2000/svg"
+        xmlns:html="http://www.w3.org/1999/xhtml"
+        onload="boom();">
+        
+<script type="text/javascript">
+
+function boom()
+{
+  var x = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "hbox");
+  generatedShape = document.getElementById("s").childNodes[3];
+  generatedShape.appendChild(x);
+  document.documentElement.removeChild(document.getElementById("s"));
+}
+
+</script>
+
+  <html:div datasources="330010-1.rdf" ref="urn:root" flex="1" id="s">
+    <template>
+      <rule>
+        <conditions>
+          <content uri="?root"/>
+          <triple subject="?root"
+                  predicate="urn:croczilla:xulsvg1:shapes"
+                  object="?shapes"/>
+          <member container="?shapes" child="?shape" id="m"/>
+        </conditions>
+        <action>
+          <hbox id="p" uri="?shape" />
+       </action>
+     </rule>
+   </template>
+ </html:div>
+</window>
--- a/content/xul/templates/src/crashtests/crashtests.list
+++ b/content/xul/templates/src/crashtests/crashtests.list
@@ -1,8 +1,9 @@
 load 329335-1.xul
 load 329884-1.xul
+HTTP load 330010.xul
 load 330012-1.xul
 load 397148-1.xul
 load 404346-1.xul
 load 415019-1.xul
 load 417840-1.xul
 load 441785-1.xul
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/387195-2.xhtml
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<title>Testcase for bug </title>
+<head>
+<script type="text/javascript">
+function boom() {
+  var colgroup = document.createElementNS("http://www.w3.org/1999/xhtml", 'colgroup');
+  document.getElementById('thead').insertBefore(colgroup, null);
+}
+</script>
+
+<style type="text/css">
+    thead {border:3px solid purple;}
+</style>
+</head>
+
+
+<body onload="boom()">
+
+<table><thead id="thead"></thead></table>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/467881-1.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<script>
+
+function boom()
+{
+  var HTML_NS = "http://www.w3.org/1999/xhtml";
+  var outer, inner, q;
+
+  function a()
+  {
+    outer = document.createElementNS(HTML_NS, "div");
+    inner = document.createElementNS(HTML_NS, "div");
+
+		inner.appendChild(document.createElementNS(HTML_NS, "iframe"));
+		inner.appendChild(document.createElementNS(HTML_NS, "div"));
+		inner.appendChild(q = document.createElementNS(HTML_NS, "span"));
+
+		outer.appendChild(inner);
+		document.documentElement.appendChild(outer);
+    setTimeout(b, 10);
+  }
+  
+  function b()
+  {
+    outer.appendChild(document.createElementNS(HTML_NS, "span"));
+    setTimeout(c, 10);
+  }
+  
+  function c()
+  {
+    q.appendChild(document.createElementNS(HTML_NS, "div"));
+    document.documentElement.removeAttribute("class");
+  }
+  
+  a();
+}
+
+window.addEventListener("load", boom, false);
+
+</script>
+</head>
+
+<frameset></frameset>
+
+</html>
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -146,16 +146,17 @@ load 383129-1.html
 load 383806-1.xhtml
 load 384344-1.html
 load 384392-1.xhtml
 load 384392-2.svg
 load 384649-1.xhtml
 load 385866-1.xhtml
 load 385880-1.xhtml
 load 387195-1.html
+load 387195-2.xhtml
 load 388715-1.html
 load 390976-1.html
 load 393326-1.html
 load 393326-2.html
 load 393661-1.html
 load 393801-1.html
 load 394014-1.html
 load 394014-2.html
@@ -209,16 +210,17 @@ load 437142-1.html
 load 444925-1.xul
 load 446328.html
 load 454751-1.xul
 load 455063-1.html
 load 455063-2.html
 load 455063-3.html
 load 455171-4.html
 load 466763-1.html
+load 467881-1.html
 load 468491-1.html
 load 468546-1.xhtml
 # These three didn't actually crash without the resizing that the
 # browser does when setting up print preview, but adding them anyway.
 load 468645-1.xhtml
 load 468645-2.xhtml
 load 468645-3.xhtml
 load 471594-1.xhtml
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/381279-1-ref.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+<style>
+div {
+  border: 1px solid black;
+  font-family: monospace;
+  width: 10ch;
+}
+</style>
+</head>
+
+<body>
+<div>
+  <span style="direction: rtl;">
+    <span style="unicode-bidi: bidi-override; color: blue;">abcd abcd abcd</span>
+    foo
+  </span>
+</div>
+</body>
+
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bidi/381279-1.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+<style>
+div {
+  border: 1px solid black;
+  font-family: monospace;
+  width: 10ch;
+}
+</style>
+</head>
+
+<body onload="document.getElementById('r').style.direction = 'rtl';">
+<div>
+  <span id="r">
+    <span style="unicode-bidi: bidi-override; color: blue;">abcd abcd abcd</span>
+    foo
+  </span>
+</div>
+</body>
+
+</html>
--- a/layout/reftests/bidi/reftest.list
+++ b/layout/reftests/bidi/reftest.list
@@ -21,16 +21,17 @@ random-if(MOZ_WIDGET_TOOLKIT=="gtk2") ==
 == with-first-letter-1b.html with-first-letter-1-ref.html
 == with-first-letter-2a.html with-first-letter-2-ref.html
 == with-first-letter-2b.html with-first-letter-2-ref.html
 == 115921-1.html 115921-1-ref.html
 == 115921-2.html 115921-2-ref.html
 == 258928-1.html 258928-1-ref.html
 == 299065-1.html 299065-1-ref.html
 == 305643-1.html 305643-1-ref.html
+== 381279-1.html 381279-1-ref.html
 random-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 386339.html 386339-ref.html
 == 409375.html 409375-ref.html
 == 413542-1.html 413542-1-ref.html
 == 413542-2.html 413542-2-ref.html
 == 413928-1.html 413928-1-ref.html
 == 413928-2.html 413928-2-ref.html
 == 425338-1a.html 425338-1-ref.html
 == 425338-1b.html 425338-1-ref.html