Bug 1147038 - Update some tests to pass on desktop platforms. r=tn
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 22 Apr 2015 10:16:33 -0400
changeset 240538 c646f3bfcbd95ca880264942c99a3eb8bda03c43
parent 240537 48eaa5547dcc2c352c2f933b2abe303282f7d4a1
child 240539 3ba8d6cc53c02108784d7864d1f8f8a7eb5d298c
push id28636
push userkwierso@gmail.com
push dateThu, 23 Apr 2015 00:16:12 +0000
treeherdermozilla-central@a5af73b32ac8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1147038
milestone40.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 1147038 - Update some tests to pass on desktop platforms. r=tn The test in question sets up an inconsistent state for desktop platforms because it intends to simulate what the APZ does, but does it only partially. The APZ code would set a CSS viewport (which the test does) but it doesn't set the scroll-position-clamping-scroll-port-size which the APZ would always do.
layout/reftests/bugs/593243-1.html
layout/reftests/bugs/593243-2.html
layout/reftests/bugs/reftest.list
layout/tools/reftest/README.txt
layout/tools/reftest/reftest-content.js
--- a/layout/reftests/bugs/593243-1.html
+++ b/layout/reftests/bugs/593243-1.html
@@ -1,11 +1,12 @@
 <!DOCTYPE HTML>
 <html class="reftest-wait"
       reftest-viewport-w="600" reftest-viewport-h="400"
+      reftest-scrollport-w="800" reftest-scrollport-h="1000"
       reftest-displayport-w="800" reftest-displayport-h="1000"
       reftest-no-sync-layers>
 <head>
   <title></title>
 <script type="text/javascript">
 function initialPaint() {
   window.removeEventListener("MozAfterPaint", initialPaint, false);
   setTimeout(moveBox, 0);
--- a/layout/reftests/bugs/593243-2.html
+++ b/layout/reftests/bugs/593243-2.html
@@ -1,11 +1,12 @@
 <!DOCTYPE HTML>
 <html class="reftest-wait"
       reftest-viewport-w="600" reftest-viewport-h="400"
+      reftest-scrollport-w="800" reftest-scrollport-h="1000"
       reftest-displayport-w="800" reftest-displayport-h="1000"
       reftest-no-sync-layers>
 <head>
   <title></title>
 <script type="text/javascript">
 function initialPaint() {
   window.removeEventListener("MozAfterPaint", initialPaint, false);
   setTimeout(type, 0);
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1588,18 +1588,18 @@ skip-if(B2G||Mulet) == 582476-1.svg 5824
 == 584699-1.html 584699-1-ref.html
 fuzzy-if(Android,2,48) == 585598-2.xhtml 585598-2-ref.xhtml
 == 586400-1.html 586400-1-ref.html
 skip-if(B2G||Mulet) fuzzy-if(d2d,52,1051) fuzzy-if(OSX==1008,129,1068) == 586683-1.html 586683-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
 == 589615-1a.xhtml 589615-1-ref.html
 == 589615-1b.html 589615-1-ref.html
 == 589672-1.html 589672-1-ref.html
 != 589682-1.html 589682-1-notref.html
-skip-if(!asyncPanZoom) == 593243-1.html 593243-1-ref.html # bug 593168
-skip-if(!asyncPanZoom) == 593243-2.html 593243-2-ref.html # bug 593168
+skip-if(Android) == 593243-1.html 593243-1-ref.html # bug 593168
+skip-if(Android) == 593243-2.html 593243-2-ref.html # bug 593168
 == 593544-1.html 593544-1-ref.html
 random-if(Android) == 594333-1.html 594333-1-ref.html
 fuzzy-if(B2G,1,40000) == 594624-1.html 594624-1-ref.html
 == 594737-1.html 594737-1-ref.html
 == 597721-1.html 597721-1-ref.html
 random-if(winWidget) fuzzy-if(B2G,3,40) fuzzy-if(Android,38,539) needs-focus == 598726-1.html 598726-1-ref.html # Fails on Windows, bug 782196
 == 599113-1.html 599113-1-ref.html
 fails-if(!haveTestPlugin) == 599476.html 599476-ref.html
--- a/layout/tools/reftest/README.txt
+++ b/layout/tools/reftest/README.txt
@@ -504,16 +504,24 @@ so 60/zoom is an integer.
 
 Setting Viewport Size: reftest-viewport-w/h="<int>"
 ===================================================
 
 If either of the "reftest-viewport-w" and "reftest-viewport-h" attributes on
 the root element are non-zero, sets the CSS viewport to the given size in
 CSS pixels. This does not affect the size of the snapshot that is taken.
 
+Setting Scrollport Size: reftest-scrollport-w/h="<int>"
+=======================================================
+
+If either of the "reftest-scrollport-w" and "reftest-scrollport-h" attributes on
+the root element are non-zero, sets the scroll-position-clamping scroll-port
+size to the given size in CSS pixels. This does not affect the size of the
+snapshot that is taken.
+
 Setting Async Scroll Mode: reftest-async-scroll attribute
 =========================================================
 
 If the "reftest-async-scroll" attribute is set on the root element, we try to
 enable async scrolling for the document. This is unsupported in many
 configurations.
 
 Setting Displayport Dimensions: reftest-displayport-x/y/w/h="<int>"
--- a/layout/tools/reftest/reftest-content.js
+++ b/layout/tools/reftest/reftest-content.js
@@ -197,16 +197,23 @@ function setupViewport(contentRootElemen
 
     var vw = attrOrDefault(contentRootElement, "reftest-viewport-w", 0);
     var vh = attrOrDefault(contentRootElement, "reftest-viewport-h", 0);
     if (vw !== 0 || vh !== 0) {
         LogInfo("Setting viewport to <w="+ vw +", h="+ vh +">");
         windowUtils().setCSSViewport(vw, vh);
     }
 
+    var sw = attrOrDefault(contentRootElement, "reftest-scrollport-w", 0);
+    var sh = attrOrDefault(contentRootElement, "reftest-scrollport-h", 0);
+    if (sw !== 0 || sh !== 0) {
+        LogInfo("Setting scrollport to <w=" + sw + ", h=" + sh + ">");
+        windowUtils().setScrollPositionClampingScrollPortSize(sw, sh);
+    }
+
     // XXX support resolution when needed
 
     // XXX support viewconfig when needed
 }
  
 function setupDisplayport(contentRootElement) {
     if (!contentRootElement) {
         return;