···8282 # chromium-based browsers refuse to run as root
8383 test-support.displayManager.auto.user = "alice";
8484 # browsers may hang with the default memory
8585- virtualisation.memorySize = "500";
8585+ virtualisation.memorySize = 500;
86868787 networking.hosts."127.0.0.1" = [ "good.example.com" "bad.example.com" ];
8888 security.pki.certificateFiles = [ "${example-good-cert}/ca.crt" ];
···113113 # which is why it will not use the system certificate store for the time being.
114114 # firefox
115115 chromium
116116- falkon
116116+ qutebrowser
117117 midori
118118 ];
119119 };
···152152 with subtest("Unknown CA is untrusted in curl"):
153153 machine.fail("curl -fv https://bad.example.com")
154154155155- browsers = [
155155+ browsers = {
156156 # Firefox was disabled here, because we needed to disable p11-kit support in nss,
157157 # which is why it will not use the system certificate store for the time being.
158158- # "firefox",
159159- "chromium",
160160- "falkon",
161161- "midori"
162162- ]
163163- errors = ["Security Risk", "not private", "Certificate Error", "Security"]
158158+ #"firefox": "Security Risk",
159159+ "chromium": "not private",
160160+ "qutebrowser -T": "Certificate error",
161161+ "midori": "Security"
162162+ }
164163165164 machine.wait_for_x()
166166- for browser, error in zip(browsers, errors):
165165+ for command, error in browsers.items():
166166+ browser = command.split()[0]
167167 with subtest("Good certificate is trusted in " + browser):
168168 execute_as(
169169- "alice", f"env P11_KIT_DEBUG=trust {browser} https://good.example.com & >&2"
169169+ "alice", f"env P11_KIT_DEBUG=trust {command} https://good.example.com & >&2"
170170 )
171171 wait_for_window_as("alice", browser)
172172 machine.wait_for_text("It works!")
···174174 execute_as("alice", "xdotool key ctrl+w") # close tab
175175176176 with subtest("Unknown CA is untrusted in " + browser):
177177- execute_as("alice", f"{browser} https://bad.example.com & >&2")
177177+ execute_as("alice", f"{command} https://bad.example.com & >&2")
178178 machine.wait_for_text(error)
179179 machine.screenshot("bad" + browser)
180180 machine.succeed("pkill " + browser)
+1-1
nixos/tests/firefox.nix
···1414 ];
15151616 # Need some more memory to record audio.
1717- virtualisation.memorySize = "500";
1717+ virtualisation.memorySize = 500;
18181919 # Create a virtual sound device, with mixing
2020 # and all, for recording audio.