Bug 1213043 - Make sure we kick off a paint in MozReftestInvalidate to ensure mozPaintCount is incremented eventually (to avoid test timeout). r=tn
authorMats Palmgren <mats@mozilla.com>
Fri, 17 Feb 2017 11:51:07 -0700
changeset 372802 3625486cc6f57dbce08fef1af227fa14db7f98af
parent 372801 323bcdc5575f0a0fc2a12d1cbe2db5ce91a4135b
child 372803 dc7d927d3f3a0796eb1a3228692060eba07f475a
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1213043
milestone54.0a1
Bug 1213043 - Make sure we kick off a paint in MozReftestInvalidate to ensure mozPaintCount is incremented eventually (to avoid test timeout). r=tn
layout/reftests/bugs/1114526-1.html
--- a/layout/reftests/bugs/1114526-1.html
+++ b/layout/reftests/bugs/1114526-1.html
@@ -1,21 +1,23 @@
 <!DOCTYPE html>
 <html class="reftest-wait">
 <head>
 <script>
 var startPaintCount = 0;
 function doTest() {
   startPaintCount = window.mozPaintCount;
+  document.querySelector('#src').style.visibility='visible';
+  document.querySelector('#dest').style.visibility='visible';
   setTimeout(check, 200);
 }
 var calls = 0;
 function check() {
   calls++;
-  if ((window.mozPaintCount - startPaintCount) > 2) {
+  if ((window.mozPaintCount - startPaintCount) > 3) {
     finishSuccess();
     return;
   }
   if (calls > 10) {
     finishFail();
     return;
   }
   setTimeout(check, 200);
@@ -41,21 +43,23 @@ div {
   width: 100px;
   height: 100px;
   position: absolute;
 }
 
 #src {
   background-image: url('1114526-1.gif');
   top: -500px;
+  visibility: hidden;
 }
 
 #dest {
   background-image: -moz-element(#src);
   top: 100px;
+  visibility: hidden;
 }
 </style>
 </head>
 <body>
   <div id="src"></div>
   <div id="dest"></div>
 <script>
 window.addEventListener("MozReftestInvalidate", doTest);