nixpkgs/nixos/tests/firefox.nix

24 lines
614 B
Nix
Raw Normal View History

import ./make-test.nix ({ pkgs, ... }: {
2014-06-28 14:04:49 +00:00
name = "firefox";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco chaoflow shlevy ];
};
machine =
{ config, pkgs, ... }:
{ imports = [ ./common/x11.nix ];
environment.systemPackages = [ pkgs.firefox ];
};
testScript =
''
$machine->waitForX;
$machine->execute("firefox file://${pkgs.valgrind}/share/doc/valgrind/html/index.html &");
$machine->waitForWindow(qr/Valgrind/);
$machine->sleep(40); # wait until Firefox has finished loading the page
$machine->screenshot("screen");
'';
})