Bug 1552478. Stop printpreview_bug396024_helper.xul creating a print preview viewer in a normal document window. r=bobowen
authorJonathan Watt <jwatt@jwatt.org>
Tue, 07 May 2019 23:58:30 +0100
changeset 474358 930f0f51b681aea2a5e915a2770f80a9914ed3df
parent 474357 73c9f2d6d3a067cd3f0a1982e22f60d70123ca21
child 474359 b02147ae4804fa1a434dca44e1020c2e7361f5f7
push id36031
push userrgurzau@mozilla.com
push dateFri, 17 May 2019 21:43:13 +0000
treeherdermozilla-central@1ae707852b60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs1552478
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552478. Stop printpreview_bug396024_helper.xul creating a print preview viewer in a normal document window. r=bobowen Differential Revision: https://phabricator.services.mozilla.com/D31613
layout/base/tests/chrome/printpreview_bug396024_helper.xul
--- a/layout/base/tests/chrome/printpreview_bug396024_helper.xul
+++ b/layout/base/tests/chrome/printpreview_bug396024_helper.xul
@@ -100,21 +100,21 @@ function run4() {
   var i = document.getElementById("i");
   i.remove();
   var loadhandler = function() {
     document.getElementById("i").removeEventListener("load", loadhandler, true);
     setTimeout(run5, 0);
   };
   i.addEventListener("load", loadhandler, true);
   document.documentElement.getBoundingClientRect();
-  document.documentElement.appendChild(i);
+  document.documentElement.prepend(i);
 }
 
 function run5() {
-  gWbp = window.frames[0].docShell.initOrReusePrintPreviewViewer();
+  gWbp = window.frames[1].docShell.initOrReusePrintPreviewViewer();
   ok(!gWbp.doingPrintPreview, "Should not be doing print preview anymore2");
 
   //XXX this shouldn't be necessary, see bug 405555
   printpreview();
   exitprintpreview();
   finish(); //should not have crashed after all of this
 }
 ]]></script>