bug 336960 - crash test by Martijn Wargers.
authorBob Clary <bclary@bclary.com>
Fri, 24 Apr 2009 10:08:12 -0700
changeset 27741 6ad02f8a56adcda3ae61978e48e875925fd9b534
parent 27740 c9211196a28edd72d9dafcdae68bf2ec1aedac81
child 27742 8334854afb84f5e561ba2b9d2cfa943153cafde2
push id6720
push userbclary@mozilla.com
push dateFri, 24 Apr 2009 17:10:36 +0000
treeherdermozilla-central@a1e84240b5c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs336960
milestone1.9.2a1pre
bug 336960 - crash test by Martijn Wargers.
content/xbl/crashtests/336960-1-inner.xhtml
content/xbl/crashtests/336960-1.html
content/xbl/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/content/xbl/crashtests/336960-1-inner.xhtml
@@ -0,0 +1,29 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <script>
+    var x=document.createElementNS('http://www.w3.org/1999/xhtml','style');
+    document.documentElement.appendChild(x);
+    function doe(){
+      var y=document.getElementsByTagName('style')[0];
+    }
+    setTimeout(doe,500);
+  </script>
+
+  <style>
+  style {-moz-binding:url(#randomxbl);}
+  </style>
+
+  <bindings xmlns="http://www.mozilla.org/xbl">
+    <binding id="randomxbl">
+      <implementation>
+        <constructor>
+          var x= parent.document.getElementsByTagName('iframe')[0];
+x.parentNode.removeChild(x);
+        </constructor>
+      </implementation>
+    </binding>
+  </bindings>
+</head>
+<body>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/xbl/crashtests/336960-1.html
@@ -0,0 +1,13 @@
+<html class="reftest-wait">
+<head>
+
+<title>Testcase bug 336960 - Crash when window gets destroyed when constructor of xbl is running</title>
+<script>
+setTimeout('document.documentElement.className = ""', 500);
+</script>
+</head><body>
+This page should not crash Mozilla, you should see no iframe<br>
+<iframe src="./336960-1-inner.xhtml"></iframe>
+
+</body>
+</html>
\ No newline at end of file
--- a/content/xbl/crashtests/crashtests.list
+++ b/content/xbl/crashtests/crashtests.list
@@ -1,15 +1,16 @@
 load 205735-1.xhtml
 load 223799-1.xul
 load 226744-1.xhtml
 load 232095-1.xul
 load 277523-1.xhtml
 load 277950-1.xhtml
 load 336744-1.html
+load 336960-1.html
 load 342954-1.xhtml
 load 342954-2.xhtml
 load 368276-1.xhtml
 load 368641-1.xhtml
 load 378521-1.xhtml
 load 382376-1.xhtml
 load 382376-2.xhtml
 load 406900-1.xul