Bug 1455868: Expect unsigned langpack install to fail on release builds. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Sat, 21 Apr 2018 16:40:23 -0700
changeset 786229 63a4f9fcda603439ebcd20b817fd5d3144628f9c
parent 786228 e57d78a2b830dc163f5dbcb070d45dd5552be786
push id107410
push usermaglione.k@gmail.com
push dateSat, 21 Apr 2018 23:41:33 +0000
reviewersaswan
bugs1455868
milestone61.0a1
Bug 1455868: Expect unsigned langpack install to fail on release builds. r?aswan MozReview-Commit-ID: DpNa24d2T6U
toolkit/mozapps/extensions/test/xpcshell/test_signed_langpack.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_langpack.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_signed_langpack.js
@@ -43,14 +43,19 @@ add_task(async function() {
   let unsignedXPI = do_get_file("data/signing_checks/langpack_unsigned.xpi");
   await installShouldFail(unsignedXPI);
 
   // Even with the general xpi signing pref off, an unsigned langapck
   // should not install.
   Services.prefs.setBoolPref(PREF_SIGNATURES_GENERAL, false);
   await installShouldFail(unsignedXPI);
 
-  // But with the langpack signing pref off, unsigned langpack should isntall.
+  // But with the langpack signing pref off, unsigned langpack should
+  // install only on non-release builds.
   Services.prefs.setBoolPref(PREF_SIGNATURES_LANGPACKS, false);
-  await installShouldSucceed(unsignedXPI);
+  if (AppConstants.MOZ_REQUIRE_SIGNING) {
+    await installShouldFail(unsignedXPI);
+  } else {
+    await installShouldSucceed(unsignedXPI);
+  }
 
   await promiseShutdownManager();
 });