Commit fc54802b authored by brizental's avatar brizental Committed by Pier Angelo Vendrame
Browse files

fixup! BB 45120: Add tests for Base Browser

Bug 44820: Disable HTTPS-only mode when running mochitests
parent 538cbbb5
Loading
Loading
Loading
Loading
+17 −0
Changes for testing/mochitest/runtests.py: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2604,6 +2604,23 @@ toolbar#nav-bar {
        if getattr(self, "testRootAbs", None):
            prefs["mochitest.testRoot"] = self.testRootAbs

        # 001-base-profile.js forces HTTPS-Only mode on, which upgrades
        # requests to the (plain http) mochitest web server and breaks test
        # content loading. Unlike a real Tor Browser install, that hardening
        # has nothing to do with what these tests exercise, and it applies
        # regardless of whether --tor-bootstrap is used.
        prefs["dom.security.https_only_mode"] = False
        prefs["dom.security.https_only_mode_pbm"] = False

        # 001-base-profile.js sets security.nocertdb, so NSS never loads the
        # on-disk cert DB that fillCertificateDB() populates with mochitest's
        # test CA, and any HTTPS test content would fail with an
        # untrusted-issuer error. Persisting a cert DB is exactly what
        # nocertdb exists to prevent in a real Tor Browser profile for
        # privacy, but that doesn't apply here: this profile is thrown away
        # after the run, so there's nothing to leak.
        prefs["security.nocertdb"] = False

        # See if we should use fake media devices.
        if options.useTestMediaDevices:
            prefs["media.audio_loopback_dev"] = self.mediaDevices["audio"]["name"]