Bug 692879. Adjust reftests so that we pass with azure-quartz. r=mwoodrow
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 25 Nov 2011 16:38:14 -0800
changeset 85864 fe11808a4109f60910d6b4b58d5ac1067243f87b
parent 85863 e6e3821a4b95b3599d93ffd37e1c08abd0b4dc35
child 85865 eb66e5b64afe00027e863082a1d5252ad181a40f
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwoodrow
bugs692879
milestone12.0a1
Bug 692879. Adjust reftests so that we pass with azure-quartz. r=mwoodrow
layout/reftests/canvas/reftest.list
layout/reftests/css-gradients/reftest.list
layout/reftests/svg/as-image/reftest.list
layout/tools/reftest/reftest.js
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -42,18 +42,21 @@ asserts-if(cocoaWidget,0-2) == size-chan
 == text-bidi-rtl-test.html text-bidi-rtl-ref.html
 
 fails-if(Android) != text-font-lang.html text-font-lang-notref.html
 
 == text-measure.html text-measure-ref.html
 
 == strokeText-path.html strokeText-path-ref.html
 
-# gradient off-by-one, fails on windows and linux
-== linear-gradient-1a.html linear-gradient-1-ref.html
+# azure quartz uses CGDrawLinearGradient instead of DrawShading
+# so we have less control over degenerate behaviour as tested by this
+# test
+fails-if(azureQuartz) == linear-gradient-1a.html linear-gradient-1-ref.html
+
 fails-if(/Mac\x20OS\x20X\x2010\.[56]/.test(http.oscpu)) == linear-gradient-1b.html linear-gradient-1-ref.html
 
 == zero-dimensions.html zero-dimensions-ref.html
 
 == evenodd-fill-sanity.html data:text/html,<body>Pass
 != evenodd-fill-1.html nonzero-fill-1.html
 == evenodd-fill-1.html evenodd-fill-ref.html
 == evenodd-fill-2.html evenodd-fill-ref.html
--- a/layout/reftests/css-gradients/reftest.list
+++ b/layout/reftests/css-gradients/reftest.list
@@ -1,14 +1,14 @@
-fails-if(Android) == linear-1a.html linear-1-ref.html
-fails-if(Android) == linear-1b.html linear-1-ref.html
-fails-if(Android) == linear-keywords-1a.html linear-keywords-1-ref.html
-fails-if(Android) == linear-keywords-1b.html linear-keywords-1-ref.html
-fails-if(Android) == linear-percent.html linear-percent-ref.html
-fails-if(Android) == linear-mix.html linear-mix-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-1a.html linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-1b.html linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-keywords-1a.html linear-keywords-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-keywords-1b.html linear-keywords-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-percent.html linear-percent-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-mix.html linear-mix-ref.html
 == linear-diagonal-1a.html linear-diagonal-1-ref.html
 == linear-diagonal-1b.html linear-diagonal-1-ref.html
 == linear-diagonal-1c.html linear-diagonal-1-ref.html
 == linear-diagonal-2a.html linear-diagonal-2-ref.html
 == linear-diagonal-2b.html linear-diagonal-2-ref.html
 == linear-diagonal-2c.html linear-diagonal-2-ref.html
 == linear-diagonal-3a.html linear-diagonal-3-ref.html
 == linear-diagonal-3b.html linear-diagonal-3-ref.html
@@ -31,30 +31,30 @@ fails-if(d2d) == linear-repeat-1f.html l
 fails-if(d2d) == linear-repeat-1g.html linear-repeat-1-ref.html # bug 582236
 == linear-size-1a.html linear-size-1-ref.html
 == linear-stops-1a.html linear-stops-1-ref.html
 == linear-stops-1b.html linear-stops-1-ref.html
 == linear-stops-1c.html linear-stops-1-ref.html
 == linear-stops-1d.html linear-stops-1-ref.html
 == linear-stops-1e.html linear-stops-1-ref.html
 == linear-stops-1f.html linear-stops-1-ref.html
-fails-if(Android) == linear-vertical-1a.html linear-vertical-1-ref.html
-fails-if(Android) == linear-vertical-1b.html linear-vertical-1-ref.html
-fails-if(Android) == linear-vertical-1c.html linear-vertical-1-ref.html
-fails-if(Android) == linear-vertical-1d.html linear-vertical-1-ref.html
-fails-if(Android) == linear-vertical-1e.html linear-vertical-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-vertical-1a.html linear-vertical-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-vertical-1b.html linear-vertical-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-vertical-1c.html linear-vertical-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-vertical-1d.html linear-vertical-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == linear-vertical-1e.html linear-vertical-1-ref.html
 == linear-viewport.html linear-viewport-ref.html
 == linear-zero-length-1a.html linear-zero-length-1-ref.html
 == linear-zero-length-1b.html linear-zero-length-1-ref.html
 == linear-zero-length-1c.html linear-zero-length-1-ref.html
 == nostops.html about:blank
 == onestop.html about:blank
-fails-if(Android) random-if(d2d) == radial-1a.html radial-1-ref.html
-fails-if(Android) == radial-2a.html radial-2-ref.html
-fails-if(Android) == radial-2b.html radial-2-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) random-if(d2d) == radial-1a.html radial-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == radial-2a.html radial-2-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == radial-2b.html radial-2-ref.html
 == radial-position-1a.html radial-position-1-ref.html
 == radial-shape-closest-corner-1a.html radial-shape-closest-corner-1-ref.html
 == radial-shape-closest-side-1a.html radial-shape-closest-side-1-ref.html
 == radial-shape-farthest-corner-1a.html radial-shape-farthest-corner-1-ref.html
 == radial-shape-farthest-side-1a.html radial-shape-farthest-side-1-ref.html
 == radial-size-1a.html radial-size-1-ref.html
 == radial-zero-length-1a.html radial-zero-length-1-ref.html
 == radial-zero-length-1b.html radial-zero-length-1-ref.html
@@ -72,33 +72,33 @@ fails-if(d2d) == repeating-linear-1b.htm
 == twostops-1b.html twostops-1-ref.html
 fails-if(/Mac\x20OS\x20X\x2010\.[56]/.test(http.oscpu)) == twostops-1c.html twostops-1-ref.html # bug 524173
 == twostops-1d.html twostops-1-ref.html
 == twostops-1e.html twostops-1-ref.html
 == twostops-1f.html twostops-1-ref.html
 == twostops-1g.html twostops-1-ref.html
 
 # from http://www.xanthir.com/:4bhipd by way of http://a-ja.net/newgrad.html
-fails-if(Android) == aja-linear-1a.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1a.html aja-linear-1-ref.html
 fails-if(!d2d) == aja-linear-1b.html aja-linear-1-ref.html # bug 526694
-fails-if(Android) == aja-linear-1c.html aja-linear-1-ref.html
-fails-if(Android) == aja-linear-1d.html aja-linear-1-ref.html
-fails-if(Android) == aja-linear-1e.html aja-linear-1-ref.html
-fails-if(Android) == aja-linear-1f.html aja-linear-1-ref.html
-fails-if(Android) == aja-linear-1g.html aja-linear-1-ref.html
-fails-if(Android) == aja-linear-2a.html aja-linear-2-ref.html
-fails-if(Android) == aja-linear-2b.html aja-linear-2-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1c.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1d.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1e.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1f.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-1g.html aja-linear-1-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-2a.html aja-linear-2-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-2b.html aja-linear-2-ref.html
 fails == aja-linear-2c.html aja-linear-2-ref.html # bug 522607
 fails-if(!d2d) == aja-linear-2d.html aja-linear-2-ref.html # bug 526694
-fails-if(Android) == aja-linear-3a.html aja-linear-3-ref.html
-fails-if(Android) == aja-linear-3b.html aja-linear-3-ref.html
-fails-if(Android) == aja-linear-4a.html aja-linear-4-ref.html
-fails-if(Android) == aja-linear-4b.html aja-linear-4-ref.html
-fails-if(Android) == aja-linear-5a.html aja-linear-5-ref.html
-fails-if(Android) fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) == aja-linear-6a.html aja-linear-6-ref.html # bug 526708
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-3a.html aja-linear-3-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-3b.html aja-linear-3-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-4a.html aja-linear-4-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-4b.html aja-linear-4-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) == aja-linear-5a.html aja-linear-5-ref.html
+fuzzy-if(azureQuartz) fails-if(Android) fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) == aja-linear-6a.html aja-linear-6-ref.html # bug 526708
 fails == aja-linear-6b.html aja-linear-6-ref.html # bug 522607
 == height-dependence-1.html height-dependence-1-ref.html
 fails-if(cocoaWidget) == height-dependence-2.html height-dependence-2-ref.html # bug 535007
 == height-dependence-3.html height-dependence-3-ref.html
 
 fails-if(d2d) == linear-onestopposition-1.html linear-onestopposition-1-ref.html # bug 638664
 == linear-onestopposition-1.html linear-onestopposition-1-ref2.html
 fails-if(d2d) fails-if(cocoaWidget) == radial-onestopposition-1.html radial-onestopposition-1-ref.html # bug 638664
--- a/layout/reftests/svg/as-image/reftest.list
+++ b/layout/reftests/svg/as-image/reftest.list
@@ -34,17 +34,17 @@ include zoom/reftest.list
 == canvas-drawImage-scale-1a.html lime100x100-ref.html
 == canvas-drawImage-scale-1b.html lime100x100-ref.html
 == canvas-drawImage-scale-1c.html lime100x100-ref.html
 
 fails == canvas-drawImage-scale-2a.html canvas-drawImage-scale-2-ref.html # XXX all edges fuzzy
 fails == canvas-drawImage-scale-2b.html canvas-drawImage-scale-2-ref.html # XXX all edges fuzzy
 
 == canvas-drawImage-slice-1a.html lime100x100-ref.html
-fails == canvas-drawImage-slice-1b.html lime100x100-ref.html # XXX all edges fuzzy
+fails-if(!azureQuartz) == canvas-drawImage-slice-1b.html lime100x100-ref.html # XXX all edges fuzzy
 
 == canvas-drawImage-origin-clean-1.html lime100x100-ref.html
 
 # Simple <img> tests
 == img-simple-1.html  lime100x100-ref.html
 == img-simple-2.html  lime100x100-ref.html
 == img-simple-3.html  img-simple-3-ref.html
 == img-simple-4.html  lime100x100-ref.html
--- a/layout/tools/reftest/reftest.js
+++ b/layout/tools/reftest/reftest.js
@@ -504,23 +504,25 @@ function BuildConditionSandbox(aURL) {
 
     // xr.XPCOMABI throws exception for configurations without full ABI
     // support (mobile builds on ARM)
     try {
         sandbox.xulRuntime.XPCOMABI = xr.XPCOMABI;
     } catch(e) {
         sandbox.xulRuntime.XPCOMABI = "";
     }
-  
+ 
+    
+    var gfxInfo = (NS_GFXINFO_CONTRACTID in CC) && CC[NS_GFXINFO_CONTRACTID].getService(CI.nsIGfxInfo);
     try {
-        // nsIGfxInfo is currently only implemented on Windows
-        sandbox.d2d = (NS_GFXINFO_CONTRACTID in CC) && CC[NS_GFXINFO_CONTRACTID].getService(CI.nsIGfxInfo).D2DEnabled;
-    } catch(e) {
-        sandbox.d2d = false;
+      sandbox.d2d = gfxInfo.D2DEnabled;
+    } catch (e) {
+      sandbox.d2d = false;
     }
+    sandbox.azureQuartz = gfxInfo.getInfo().AzureBackend == "quartz";
 
     sandbox.layersGPUAccelerated =
       gWindowUtils.layerManagerType != "Basic";
     sandbox.layersOpenGL =
       gWindowUtils.layerManagerType == "OpenGL";
 
     // Shortcuts for widget toolkits.
     sandbox.Android = xr.OS == "Android";