Bug 1254942 - Redo sanity check whenever buildId changes. r=mchang,a=ritu
authorChris Pearce <cpearce@mozilla.com>
Thu, 10 Mar 2016 15:01:58 +1300
changeset 323376 8db798e8974a2e906d5b9958f945749285731a39
parent 323375 abdbe1190ce3b25fabe31899864e57cd6fff6623
child 323377 92b98e56360e81c833442b1927d7fdcbff18d6b1
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmchang, ritu
bugs1254942
milestone47.0a2
Bug 1254942 - Redo sanity check whenever buildId changes. r=mchang,a=ritu MozReview-Commit-ID: 826Mt89OuPp
toolkit/components/gfx/SanityTest.js
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -240,17 +240,17 @@ SanityTest.prototype = {
   classID: Components.ID("{f3a8ca4d-4c83-456b-aee2-6a2cbf11e9bd}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference]),
 
   shouldRunTest: function() {
     // Only test gfx features if firefox has updated, or if the user has a new
     // gpu or drivers.
     var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
-    var xulVersion = appInfo.version;
+    var buildId = Services.appinfo.platformBuildID;
     var gfxinfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
 
     if (Preferences.get(RUNNING_PREF, false)) {
       Preferences.set(DISABLE_VIDEO_PREF, true);
       reportResult(TEST_CRASHED);
       return false;
     }
 
@@ -265,27 +265,27 @@ SanityTest.prototype = {
         reportTestReason(reason);
       }
       return false;
     }
 
     // TODO: Handle dual GPU setups
     if (checkPref(DRIVER_PREF, gfxinfo.adapterDriverVersion, REASON_DRIVER_CHANGED) &&
         checkPref(DEVICE_PREF, gfxinfo.adapterDeviceID, REASON_DEVICE_CHANGED) &&
-        checkPref(VERSION_PREF, xulVersion, REASON_FIREFOX_CHANGED))
+        checkPref(VERSION_PREF, buildId, REASON_FIREFOX_CHANGED))
     {
       return false;
     }
 
     // Enable hardware decoding so we can test again
     // and record the driver version to detect if the driver changes.
     Preferences.set(DISABLE_VIDEO_PREF, false);
     Preferences.set(DRIVER_PREF, gfxinfo.adapterDriverVersion);
     Preferences.set(DEVICE_PREF, gfxinfo.adapterDeviceID);
-    Preferences.set(VERSION_PREF, xulVersion);
+    Preferences.set(VERSION_PREF, buildId);
 
     // Update the prefs so that this test doesn't run again until the next update.
     Preferences.set(RUNNING_PREF, true);
     Services.prefs.savePrefFile(null);
     return true;
   },
 
   observe: function(subject, topic, data) {