Bug 1446954: Remove support for styloVsGecko reftests. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 19 Mar 2018 14:22:24 +0100
changeset 408964 bc054c5c8cc82aab0b86a579dd951e97966b38ba
parent 408963 68011d9bb81941327c36ae7ef67b9ffe821a047a
child 408965 c5186bbee6e595ea2b2ca9bb2d3efa64b0afb14b
push id101080
push userecoal95@gmail.com
push dateTue, 20 Mar 2018 10:30:54 +0000
treeherdermozilla-inbound@c5186bbee6e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1446954
milestone61.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 1446954: Remove support for styloVsGecko reftests. r=xidorn MozReview-Commit-ID: Ft2DyjdC04l
layout/tools/reftest/manifest.jsm
--- a/layout/tools/reftest/manifest.jsm
+++ b/layout/tools/reftest/manifest.jsm
@@ -63,20 +63,16 @@ function ReadManifest(aURL, aFilter)
     var sandbox = BuildConditionSandbox(aURL);
     var lineNo = 0;
     var urlprefix = "";
     var defaultTestPrefSettings = [], defaultRefPrefSettings = [];
     if (g.compareRetainedDisplayLists) {
         AddRetainedDisplayListTestPrefs(sandbox, defaultTestPrefSettings,
                                         defaultRefPrefSettings);
     }
-    if (g.compareStyloToGecko) {
-        AddStyloTestPrefs(sandbox, defaultTestPrefSettings,
-                          defaultRefPrefSettings);
-    }
     for (var str of lines) {
         ++lineNo;
         if (str.charAt(0) == "#")
             continue; // entire line was a comment
         var i = str.search(/\s+#/);
         if (i >= 0)
             str = str.substring(0, i);
         // strip leading and trailing whitespace
@@ -105,20 +101,16 @@ function ReadManifest(aURL, aFilter)
                 if (!AddPrefSettings(m[1], m[2], m[3], sandbox, defaultTestPrefSettings, defaultRefPrefSettings)) {
                     throw "Error in pref value in manifest file " + aURL.spec + " line " + lineNo;
                 }
             }
             if (g.compareRetainedDisplayLists) {
                 AddRetainedDisplayListTestPrefs(sandbox, defaultTestPrefSettings,
                                                 defaultRefPrefSettings);
             }
-            if (g.compareStyloToGecko) {
-                AddStyloTestPrefs(sandbox, defaultTestPrefSettings,
-                                  defaultRefPrefSettings);
-            }
             continue;
         }
 
         var expected_status = EXPECTED_PASS;
         var allow_silent_fail = false;
         var minAsserts = 0;
         var maxAsserts = 0;
         var needs_focus = false;
@@ -322,17 +314,17 @@ function ReadManifest(aURL, aFilter)
 
             if (items[0] == TYPE_REFTEST_NOTEQUAL &&
                 expected_status == EXPECTED_FUZZY &&
                 (fuzzy_delta.min > 0 || fuzzy_pixels.min > 0)) {
                 throw "Error in manifest file " + aURL.spec + " line " + lineNo + ": minimum fuzz must be zero for tests of type " + items[0];
             }
 
             var type = items[0];
-            if (g.compareStyloToGecko || g.compareRetainedDisplayLists) {
+            if (g.compareRetainedDisplayLists) {
                 type = TYPE_REFTEST_EQUAL;
 
                 // We expect twice as many assertion failures when running in
                 // styloVsGecko mode because we run each test twice: once in
                 // Stylo mode and once in Gecko mode.
                 minAsserts *= 2;
                 maxAsserts *= 2;
 
@@ -496,21 +488,19 @@ sandbox.compareRetainedDisplayLists = g.
     // the real check in `nsLayoutUtils.cpp` to ensure they test the same way.
     if (env.get("STYLO_FORCE_ENABLED")) {
         styloEnabled = true;
     } else if (env.get("STYLO_FORCE_DISABLED")) {
         styloEnabled = false;
     } else {
         styloEnabled = prefs.getBoolPref("layout.css.servo.enabled", false);
     }
-    sandbox.stylo = styloEnabled && !g.compareStyloToGecko;
-    sandbox.styloVsGecko = g.compareStyloToGecko;
+    sandbox.stylo = styloEnabled;
 #else
     sandbox.stylo = false;
-    sandbox.styloVsGecko = false;
 #endif
 
     sandbox.skiaPdf = false;
 
 #ifdef RELEASE_OR_BETA
     sandbox.release_or_beta = true;
 #else
     sandbox.release_or_beta = false;
@@ -578,23 +568,16 @@ sandbox.compareRetainedDisplayLists = g.
 function AddRetainedDisplayListTestPrefs(aSandbox, aTestPrefSettings,
                                          aRefPrefSettings) {
     AddPrefSettings("test-", "layout.display-list.retain", "true", aSandbox,
                     aTestPrefSettings, aRefPrefSettings);
     AddPrefSettings("ref-", "layout.display-list.retain", "false", aSandbox,
                     aTestPrefSettings, aRefPrefSettings);
 }
 
-function AddStyloTestPrefs(aSandbox, aTestPrefSettings, aRefPrefSettings) {
-    AddPrefSettings("test-", "layout.css.servo.enabled", "true", aSandbox,
-                    aTestPrefSettings, aRefPrefSettings);
-    AddPrefSettings("ref-", "layout.css.servo.enabled", "false", aSandbox,
-                    aTestPrefSettings, aRefPrefSettings);
-}
-
 function AddPrefSettings(aWhere, aPrefName, aPrefValExpression, aSandbox, aTestPrefSettings, aRefPrefSettings) {
     var prefVal = Cu.evalInSandbox("(" + aPrefValExpression + ")", aSandbox);
     var prefType;
     var valType = typeof(prefVal);
     if (valType == "boolean") {
         prefType = PREF_BOOLEAN;
     } else if (valType == "string") {
         prefType = PREF_STRING;
@@ -602,18 +585,17 @@ function AddPrefSettings(aWhere, aPrefNa
         prefType = PREF_INTEGER;
     } else {
         return false;
     }
     var setting = { name: aPrefName,
                     type: prefType,
                     value: prefVal };
 
-    if ((g.compareStyloToGecko && aPrefName != "layout.css.servo.enabled") ||
-        (g.compareRetainedDisplayLists && aPrefName != "layout.display-list.retain")) {
+    if (g.compareRetainedDisplayLists && aPrefName != "layout.display-list.retain") {
         // ref-pref() is ignored, test-pref() and pref() are added to both
         if (aWhere != "ref-") {
             aTestPrefSettings.push(setting);
             aRefPrefSettings.push(setting);
         }
     } else {
         if (aWhere != "ref-") {
             aTestPrefSettings.push(setting);
@@ -685,18 +667,16 @@ function CreateUrls(test) {
         var testURI = g.ioService.newURI(file, null, testbase);
         secMan.checkLoadURIWithPrincipal(principal, testURI,
                                          Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
         return testURI;
     }
 
     let files = [test.url1, test.url2];
     [test.url1, test.url2] = files.map(FileToURI);
-    if (test.url2 && g.compareStyloToGecko)
-        test.url2 = test.url1;
 
     return test;
 }
 
 function AddTestItem(aTest, aFilter) {
     if (!aFilter)
         aFilter = [null, [], false];