Bug 1402376 - test code - Add whether the client has an incompatible version of JAWS to the update url. r=jimm
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 22 Sep 2017 12:45:39 -0700
changeset 382450 3870c3b2cb5418cdffa1fd4cb612f9b36265c8cd
parent 382449 a2d9582ceb1f11bfdc28e492c587f162d7b0c28a
child 382451 db561b3fd2655dffd04aaa0995f3cb06c3f36d09
push id95343
push userrstrong@mozilla.com
push dateFri, 22 Sep 2017 19:45:45 +0000
treeherdermozilla-inbound@3870c3b2cb54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1402376
milestone58.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 1402376 - test code - Add whether the client has an incompatible version of JAWS to the update url. r=jimm
testing/modules/AppInfo.jsm
toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
--- a/testing/modules/AppInfo.jsm
+++ b/testing/modules/AppInfo.jsm
@@ -53,16 +53,17 @@ this.newAppInfo = function(options = {})
     platformBuildID: origPlatformInfo.platformBuildID,
 
     // nsIXULRuntime
     inSafeMode: false,
     logConsoleErrors: true,
     OS,
     XPCOMABI: "noarch-spidermonkey",
     invalidateCachesOnRestart() {},
+    shouldBlockIncompatJaws: false,
 
     // nsIWinAppHelper
     get userCanElevate() {
       return false;
     },
   };
 
   let interfaces = [Ci.nsIXULAppInfo,
--- a/toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
+++ b/toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
@@ -341,11 +341,16 @@ add_task(async function test_custom() {
   Assert.equal(await getResult(url), "custom",
                "the url query string for %CUSTOM%" + MSG_SHOULD_EQUAL);
 });
 
 // url constructed with %SYSTEM_CAPABILITIES%
 add_task(async function test_systemCapabilities() {
   let url = URL_PREFIX + "%SYSTEM_CAPABILITIES%/";
   let systemCapabilities = "ISET:" + getInstructionSet() + ",MEM:" + getMemoryMB();
+  if (AppConstants.platform == "win") {
+    // The default value for shouldBlockIncompatJaws in the mock
+    // Services.appinfo is false so the value should be JAWS:0
+    systemCapabilities += ",JAWS:0";
+  }
   Assert.equal(await getResult(url), systemCapabilities,
                "the url param for %SYSTEM_CAPABILITIES%" + MSG_SHOULD_EQUAL);
 });