diff options
Diffstat (limited to '')
23 files changed, 455 insertions, 0 deletions
diff --git a/dom/xul/crashtests/107518-1.xml b/dom/xul/crashtests/107518-1.xml new file mode 100644 index 0000000000..58e652624c --- /dev/null +++ b/dom/xul/crashtests/107518-1.xml @@ -0,0 +1,52 @@ +<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE window>
+
+<window
+ id = "xulnote-main-window"
+ xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html = "http://www.w3.org/1999/xhtml"
+ onload = "init();"
+>
+ <scrollbox>
+ <vbox style="background-color:white;">
+ <label value="hahaha 0"/>
+ <label value="hahaha 1"/>
+ <label value="hahaha 2"/>
+ <label value="hahaha 3"/>
+ <label value="hahaha 4"/>
+ <label value="hahaha 5"/>
+ <label value="hahaha 6"/>
+ <label value="hahaha 7"/>
+ <label value="hahaha 8"/>
+ <label value="hahaha 9"/>
+ <label value="hahaha 10"/>
+ <label value="hahaha 11"/>
+ <label value="hahaha 12"/>
+ <label value="hahaha 13"/>
+ <label value="hahaha 14"/>
+ <label value="hahaha 15"/>
+ <label value="hahaha 16"/>
+ <label value="hahaha 17"/>
+ <label value="hahaha 18"/>
+ <label value="hahaha 19"/>
+ </vbox>
+<scrollbar
+ id="identifier"
+ align="horizontal"
+ curpos="20"
+ maxpos="100"
+ increment="1"
+ pageincrement="10"/>
+
+ </scrollbox>
+
+ <script type="application/x-javascript">
+ <![CDATA[
+ function init()
+ {
+ }
+ ]]>
+ </script>
+
+</window>
diff --git a/dom/xul/crashtests/253479-1.xhtml b/dom/xul/crashtests/253479-1.xhtml new file mode 100644 index 0000000000..5860d2200d --- /dev/null +++ b/dom/xul/crashtests/253479-1.xhtml @@ -0,0 +1,6 @@ +<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+>
+<html:div style="position:fixed;"/>
+</window>
\ No newline at end of file diff --git a/dom/xul/crashtests/253479-2.xhtml b/dom/xul/crashtests/253479-2.xhtml new file mode 100644 index 0000000000..43a8c17b84 --- /dev/null +++ b/dom/xul/crashtests/253479-2.xhtml @@ -0,0 +1,4 @@ +<?xml version="1.0"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <x style="position:fixed; display: block;"/>
+</window>
diff --git a/dom/xul/crashtests/326204-1.xhtml b/dom/xul/crashtests/326204-1.xhtml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/dom/xul/crashtests/326204-1.xhtml diff --git a/dom/xul/crashtests/326644-1-inner.xhtml b/dom/xul/crashtests/326644-1-inner.xhtml new file mode 100644 index 0000000000..63ed9b7212 --- /dev/null +++ b/dom/xul/crashtests/326644-1-inner.xhtml @@ -0,0 +1,34 @@ +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
+ title="Testcase bug 326644 - Crash when changing enumerated properties of objects in xul">
+
+<html:script><![CDATA[
+var timers=0;
+function doe(aObj, aNested, aCurrentTimer){
+var temp =0;
+for (var i in aObj) {
+try {
+if (typeof aObj[i] == 'object') {
+ if (aNested >= 19 || aObj[i] == window.location)
+ continue;
+ setTimeout(doe,500, aObj[i], ++aNested, timers);
+ timers++;
+}
+}
+catch(e){}
+try {
+ //if (temp == 68 && aNested == 21 && aCurrentTimer >= 116) {
+ // alert(i + '-'+ aObj[i]);
+ // return;
+ // }
+ aObj[i]= i;
+ temp+=1;
+}
+catch (e) {
+
+}
+}
+}
+var s=document.getElementsByTagName('window')[0];
+setTimeout(doe,100, s, 0);
+]]></html:script>
+</window>
diff --git a/dom/xul/crashtests/326644-1.html b/dom/xul/crashtests/326644-1.html new file mode 100644 index 0000000000..6f1d88a5eb --- /dev/null +++ b/dom/xul/crashtests/326644-1.html @@ -0,0 +1,9 @@ +<html class="reftest-wait"> +<head> +<script> +setTimeout('document.documentElement.className = ""', 1000); +</script> +<body> +<iframe src="326644-1-inner.xhtml"></iframe> +</body> +</html> diff --git a/dom/xul/crashtests/326875-1.xhtml b/dom/xul/crashtests/326875-1.xhtml new file mode 100644 index 0000000000..9dca9a0d53 --- /dev/null +++ b/dom/xul/crashtests/326875-1.xhtml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> + +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + + +<script> + + +function init() { + + var m = document.getElementById("m"); + m.parentNode.removeChild(m); + m.controllers; +}; + + +window.addEventListener("load", init, false); + +</script> + + + +<hbox id="m" /> + +</window> diff --git a/dom/xul/crashtests/329982-1.xhtml b/dom/xul/crashtests/329982-1.xhtml new file mode 100644 index 0000000000..43f374a57e --- /dev/null +++ b/dom/xul/crashtests/329982-1.xhtml @@ -0,0 +1,42 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + +<script> + +function init() +{ + var A = document.getElementById("z"); + var B = A.nextSibling; + var C = B.nextSibling; + var P = A.parentNode; + + document.addEventListener("DOMNodeRemoved", fizzy, false); + P.removeChild(B); + document.removeEventListener("DOMNodeRemoved", fizzy, false); + + function fizzy() + { + document.removeEventListener("DOMNodeRemoved", fizzy, false); // avoid recursion + P.removeChild(A); + } + + document.documentElement.appendChild(C); +} + + +window.addEventListener("load", init, false); + +</script> + +</head> + +<body> + +<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + +<menupopup y="x">
<menuitem id="z"/>
<menuitem/>
<menuitem/>
</menupopup>
+ +</hbox> + +</body> +</html>
\ No newline at end of file diff --git a/dom/xul/crashtests/336096-1.xhtml b/dom/xul/crashtests/336096-1.xhtml new file mode 100644 index 0000000000..e15691d88d --- /dev/null +++ b/dom/xul/crashtests/336096-1.xhtml @@ -0,0 +1,41 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<script> +<![CDATA[ + +function init() +{ + var targetWindow = window.frames[0]; + var targetDocument = targetWindow.document; + + targetDocument.body.appendChild(document.getElementById('rootish')); + targetDocument.designMode = 'on'; + + var r = targetDocument.createRange(); + r.setStart(targetDocument.getElementById("start"), 0); + r.setEnd (targetDocument.getElementById("end"), 0); + targetWindow.getSelection().addRange(r); + + targetDocument.execCommand('bold', false, null); +} + +]]> +</script> +</head> + +<body onload="setTimeout(init, 200);"> + +<iframe src="data:text/html," style="width: 95%; height: 500px;"></iframe> + +<div id="rootish"> + <div id="start"></div> + <hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <hbox/> + <vbox id="end"> + <hbox/> + </vbox> + </hbox> +</div> + +</body> +</html> diff --git a/dom/xul/crashtests/344215-1.xhtml b/dom/xul/crashtests/344215-1.xhtml new file mode 100644 index 0000000000..6443c22d6c --- /dev/null +++ b/dom/xul/crashtests/344215-1.xhtml @@ -0,0 +1,7 @@ +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + +<observes/> + +<description>You should not see any assertions in a debug build.</description> + +</window>
\ No newline at end of file diff --git a/dom/xul/crashtests/354611-1.html b/dom/xul/crashtests/354611-1.html new file mode 100644 index 0000000000..fe25de3660 --- /dev/null +++ b/dom/xul/crashtests/354611-1.html @@ -0,0 +1,20 @@ +<html> +<head> +<script> + +var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; + +function boom() +{ + var z = document.createElementNS(XUL_NS, "window"); + document.body.appendChild(z); + z.setAttribute("hidechrome", "true"); +} + +</script> + +<body onload="boom();"> + +</body> + +</html>
\ No newline at end of file diff --git a/dom/xul/crashtests/360078-1.xhtml b/dom/xul/crashtests/360078-1.xhtml new file mode 100644 index 0000000000..a29087014d --- /dev/null +++ b/dom/xul/crashtests/360078-1.xhtml @@ -0,0 +1,42 @@ +<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> +<head> + +<style> +<![CDATA[ +#baz { -moz-binding: url(360078-1xbl.xml#foo); } +]]> +</style> + +<script> +<![CDATA[ + +function stuff() +{ + var baz = document.getElementById("baz"); + var count = 0; + + setTimeout(step, 30); + + function step() + { + ++count; + if (count < 15) { + baz.cloneNode(true); + setTimeout(step, 30); + } + else { + document.documentElement.removeAttribute("class"); + } + } + +} + +]]> +</script> +</head> +<body onload="stuff()"> + +<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="baz"></hbox> + +</body> +</html> diff --git a/dom/xul/crashtests/363791-1.xhtml b/dom/xul/crashtests/363791-1.xhtml new file mode 100644 index 0000000000..0786960f23 --- /dev/null +++ b/dom/xul/crashtests/363791-1.xhtml @@ -0,0 +1,44 @@ +<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> + +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + onload="setTimeout(boom, 30);" class="reftest-wait"> + +<script> + +function boom() +{ + var tree = document.getElementById("tree"); + var treecols = document.getElementById("treecols"); + var treechildren = document.getElementById("treechildren"); + + tree.appendChild(treechildren); // no real change + + function boom2() { + treecols.parentNode.removeChild(treecols); + document.documentElement.removeAttribute("class"); + } + + setTimeout(boom2, 30); +} + +</script> + + +<tree rows="6" id="tree"> + + <treecols id="treecols"> + <treecol id="firstname" label="First Name"/> + </treecols> + + <treechildren id="treechildren"> + <treeitem> + <treerow> + <treecell label="Bob"/> + </treerow> + </treeitem> + </treechildren> + +</tree> + + +</window> diff --git a/dom/xul/crashtests/384877-1-inner.xhtml b/dom/xul/crashtests/384877-1-inner.xhtml new file mode 100644 index 0000000000..bd75aa87a7 --- /dev/null +++ b/dom/xul/crashtests/384877-1-inner.xhtml @@ -0,0 +1,12 @@ +<menupopup xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="d" popup="d"> +<script> +function doe() { +var d = document.getElementById('d'); +if (d.openPopup) { + d.openPopup(document.documentElement, 'before_start', 0, 0, false, false); +// alert(d.state); +} + +setTimeout(doe, 200); +</script> +</menupopup> diff --git a/dom/xul/crashtests/384877-1.html b/dom/xul/crashtests/384877-1.html new file mode 100644 index 0000000000..b4ecd1b5f8 --- /dev/null +++ b/dom/xul/crashtests/384877-1.html @@ -0,0 +1,9 @@ +<html class="reftest-wait"> +<head> +<script> +setTimeout('document.documentElement.className = ""', 1000); +</script> +<body> +<iframe src="384877-1-inner.xhtml"></iframe> +</body> +</html> diff --git a/dom/xul/crashtests/386914-1-inner.xhtml b/dom/xul/crashtests/386914-1-inner.xhtml new file mode 100644 index 0000000000..909889d8b5 --- /dev/null +++ b/dom/xul/crashtests/386914-1-inner.xhtml @@ -0,0 +1,10 @@ +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="a"> + +<box id="b" observes="a"/> + +<html:script xmlns:html="http://www.w3.org/1999/xhtml"> +document.getElementById('b').addEventListener('DOMAttrModified', function(e) {document.removeChild(document.documentElement);}, true); +setTimeout(function() {document.getElementById('a').setAttribute('tabindex', '1') ;}, 100); +</html:script> + +</window>
\ No newline at end of file diff --git a/dom/xul/crashtests/386914-1.html b/dom/xul/crashtests/386914-1.html new file mode 100644 index 0000000000..2bb1224ab7 --- /dev/null +++ b/dom/xul/crashtests/386914-1.html @@ -0,0 +1,9 @@ +<html class="reftest-wait"> +<head> +<script> +setTimeout('document.documentElement.className = ""', 1000); +</script> +<body> +<iframe src="386914-1-inner.xhtml"></iframe> +</body> +</html> diff --git a/dom/xul/crashtests/425821-1.xhtml b/dom/xul/crashtests/425821-1.xhtml new file mode 100644 index 0000000000..9764e64aad --- /dev/null +++ b/dom/xul/crashtests/425821-1.xhtml @@ -0,0 +1,15 @@ +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="boom();"> +<script type="text/javascript"> + +function boom() +{ + var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; + var wiz = document.createElementNS(XUL_NS, "wizard"); + var btn = document.createElementNS(XUL_NS, "hbox"); + btn.setAttribute("anonid", "Buttons"); + wiz.appendChild(btn); + wiz.cloneNode(true); +} + +</script> +</window> diff --git a/dom/xul/crashtests/428951-1.xhtml b/dom/xul/crashtests/428951-1.xhtml new file mode 100644 index 0000000000..41dd353f3d --- /dev/null +++ b/dom/xul/crashtests/428951-1.xhtml @@ -0,0 +1,21 @@ +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:mathml="http://www.w3.org/1998/Math/MathML"> +<box> + <box style="background: initial;" id="f"> + <box style="margin-top: -9999999px;"/> + </box> + <mathml:divergence> + <box/> + </mathml:divergence> + <mathml:moment command="f"/> +</box> + +<script id="script" xmlns="http://www.w3.org/1999/xhtml"><![CDATA[ +function init() { + var f = document.getElementsByTagName('mathml:divergence')[0]; + window.addEventListener('DOMAttrModified',function() { f.remove();}, true); + var x=document.getElementsByTagName('mathml:moment')[0]; + x.remove(); +} +window.addEventListener("load", init, false); +]]></script> +</window> diff --git a/dom/xul/crashtests/431906-1-inner.xhtml b/dom/xul/crashtests/431906-1-inner.xhtml new file mode 100644 index 0000000000..367f621b2f --- /dev/null +++ b/dom/xul/crashtests/431906-1-inner.xhtml @@ -0,0 +1,19 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<colgroup id="a" command="a"> +<box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> +<box id="a" command="a"/> +<box id="a" command="a"/> +</box> +</colgroup> +<script><![CDATA[ +function doe(){ +document.getElementsByTagName('*')[1].setAttribute('id',''); +document.getElementsByTagName('*')[1].setAttribute('xmlns', ''); +document.getElementsByTagName('*')[3].setAttribute('id',''); + +document.getElementsByTagName('*')[4].removeAttribute('xmlns'); +document.getElementsByTagName('*')[4].setAttribute('width', '1px'); +} +setTimeout(doe,100); +]]></script> +</html>
\ No newline at end of file diff --git a/dom/xul/crashtests/431906-1.html b/dom/xul/crashtests/431906-1.html new file mode 100644 index 0000000000..a8570b1bc0 --- /dev/null +++ b/dom/xul/crashtests/431906-1.html @@ -0,0 +1,9 @@ +<html class="reftest-wait"> +<head> +<script> +setTimeout('document.documentElement.className = ""', 1000); +</script> +<body> +<iframe src="431906-1-inner.xhtml"></iframe> +</body> +</html> diff --git a/dom/xul/crashtests/461917-1.xhtml b/dom/xul/crashtests/461917-1.xhtml new file mode 100644 index 0000000000..15792f6f0f --- /dev/null +++ b/dom/xul/crashtests/461917-1.xhtml @@ -0,0 +1,6 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> +<head></head> +<body> +<tabs xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onselect="#"><wizard/></tabs> +</body> +</html> diff --git a/dom/xul/crashtests/crashtests.list b/dom/xul/crashtests/crashtests.list new file mode 100644 index 0000000000..970d57b457 --- /dev/null +++ b/dom/xul/crashtests/crashtests.list @@ -0,0 +1,17 @@ +load 107518-1.xml +load chrome://reftest/content/crashtests/dom/xul/crashtests/253479-1.xhtml +load chrome://reftest/content/crashtests/dom/xul/crashtests/253479-2.xhtml +load chrome://reftest/content/crashtests/dom/xul/crashtests/326204-1.xhtml +load 326644-1.html +load chrome://reftest/content/crashtests/dom/xul/crashtests/326875-1.xhtml +load 329982-1.xhtml +load 336096-1.xhtml +load chrome://reftest/content/crashtests/dom/xul/crashtests/344215-1.xhtml +load 354611-1.html +skip-if(Android) load chrome://reftest/content/crashtests/dom/xul/crashtests/363791-1.xhtml +load 384877-1.html +load 386914-1.html +load chrome://reftest/content/crashtests/dom/xul/crashtests/425821-1.xhtml +load chrome://reftest/content/crashtests/dom/xul/crashtests/428951-1.xhtml +load 431906-1.html +load 461917-1.xhtml |