Bug 1073537 - Skip payload.info.revision check on non-official builds. r=froydnj
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Fri, 10 Oct 2014 17:21:18 +0200
changeset 209863 e4368578fe83b7ac0dd70ff600060c4ba3f075f9
parent 209862 89260f6357816b361ed2b6d3dc331638087fa9e2
child 209864 98fade97048aa987f8e274642fd4010442685d6f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfroydnj
bugs1073537
milestone35.0a1
Bug 1073537 - Skip payload.info.revision check on non-official builds. r=froydnj
toolkit/components/telemetry/tests/unit/test_TelemetryPing.js
toolkit/components/telemetry/tests/unit/xpcshell.ini
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js
@@ -153,17 +153,19 @@ function checkPayloadInfo(payload, reaso
   for (let f in expected_info) {
     do_check_eq(payload.info[f], expected_info[f]);
   }
 
   do_check_eq(payload.info.reason, reason);
   do_check_true("appUpdateChannel" in payload.info);
   do_check_true("locale" in payload.info);
   do_check_true("revision" in payload.info);
-  do_check_true(payload.info.revision.startsWith("http"));
+  if (Services.appinfo.isOfficial) {
+    do_check_true(payload.info.revision.startsWith("http"));
+  }
 
   try {
     // If we've not got nsIGfxInfoDebug, then this will throw and stop us doing
     // this test.
     let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfoDebug);
     let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
     let isOSX = ("nsILocalFileMac" in Components.interfaces);
 
--- a/toolkit/components/telemetry/tests/unit/xpcshell.ini
+++ b/toolkit/components/telemetry/tests/unit/xpcshell.ini
@@ -5,17 +5,16 @@ skip-if = toolkit == 'gonk'
 
 [test_nsITelemetry.js]
 [test_TelemetryLateWrites.js]
 [test_TelemetryLockCount.js]
 [test_TelemetryLog.js]
 [test_TelemetryPing.js]
 # Bug 676989: test fails consistently on Android
 # fail-if = os == "android"
-fail-if = !official # This test fails in unofficial builds because the payload revision is unavailable
 [test_TelemetryPing_idle.js]
 [test_TelemetryStopwatch.js]
 [test_TelemetryPingBuildID.js]
 [test_ThirdPartyCookieProbe.js]
 [test_TelemetrySendOldPings.js]
 skip-if = debug == true || os == "android" # Disabled due to intermittent orange on Android
 [test_ThreadHangStats.js]
 run-sequentially = Bug 1046307, test can fail intermittently when CPU load is high