Bug 1385298 - Fix test for bug 504224 to actually do something. r=bkelly, a=test-only
authorHonza Bambas <honzab.moz@firemni.cz>
Mon, 04 Dec 2017 15:24:00 -0500
changeset 442804 a5f6db550124044d2c877aeba4308a3f7ddf1394
parent 442803 21fe5700a3a6f6e4cd684cae8da87def76998e57
child 442805 d4455df557afa84b651b2529fc4aa84bfef02b0c
push id8343
push userryanvm@gmail.com
push dateThu, 07 Dec 2017 13:36:26 +0000
treeherdermozilla-beta@1cc170b6689a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly, test-only
bugs1385298, 504224
milestone58.0
Bug 1385298 - Fix test for bug 504224 to actually do something. r=bkelly, a=test-only
dom/base/crashtests/504224.html
--- a/dom/base/crashtests/504224.html
+++ b/dom/base/crashtests/504224.html
@@ -1,23 +1,29 @@
 <html class="reftest-wait">
 <head>
 <title>Crash [@ nsFocusManager::GetCommonAncestor], part 2</title>
 </head>
 <body>
-<iframe src="file_504224.html" id="content"></iframe>
 <script>
-var src=document.getElementById('src');
+function oniframeload() {
+  window.frames[0].location.reload();
+};
+</script>
+<iframe src="file_504224.html" id="content" onload="oniframeload();" ></iframe>
+<script>
+var src='file_504224.html';
 setInterval(function() {
-  if (!document.getElementById('content')) {
-    var x=document.createElement('iframe');
+  var x = document.getElementById('content');
+  if (!x) {
+    x=document.createElement('iframe');
     x.src=src;
     x.id = 'content';
     document.body.appendChild(x);
-    setTimeout(function() { window.focus(); document.documentElement.removeAttribute('class'); }, 100);
-  } else {
-    window.frames[0].location.reload();
+    setTimeout(function() {
+      window.focus();
+      document.documentElement.removeAttribute('class');
+    }, 100);
   }
 }, 500);
 </script>
 </body>
 </html>
-