summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-03-17 13:00:18 +0100
committerGitHub <noreply@github.com>2017-03-17 13:00:18 +0100
commitf9fb38fcae7631903d23523cb987266592e35b0a (patch)
tree53359365164d44a1615874e08365aaf34b483d84 /nixos
parent17eaa5fe25a3b3020b8c3d257e26660d9f29cd0a (diff)
parent14a3412048473e022e4bc2c687c66bb5f30c0e42 (diff)
downloadnixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar.gz
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar.bz2
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar.lz
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar.xz
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.tar.zst
nixlib-f9fb38fcae7631903d23523cb987266592e35b0a.zip
Merge pull request #23924 from 7c6f434c/improve-firefox-test
nixos: tests: firefox: make more comprehensive
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/firefox.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix
index 1bdabe93fec1..e1b628c91445 100644
--- a/nixos/tests/firefox.nix
+++ b/nixos/tests/firefox.nix
@@ -8,15 +8,21 @@ import ./make-test.nix ({ pkgs, ... }: {
     { config, pkgs, ... }:
 
     { imports = [ ./common/x11.nix ];
-      environment.systemPackages = [ pkgs.firefox ];
+      environment.systemPackages = [ pkgs.firefox pkgs.xdotool ];
     };
 
   testScript =
     ''
       $machine->waitForX;
-      $machine->execute("firefox file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html &");
+      $machine->execute("xterm -e 'firefox file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' &");
       $machine->waitForWindow(qr/Valgrind/);
       $machine->sleep(40); # wait until Firefox has finished loading the page
+      $machine->execute("xdotool key space"); # do I want to make Firefox the
+                             # default browser? I just want to close the dialog
+      $machine->sleep(2); # wait until Firefox hides the default browser window
+      $machine->execute("xdotool key F12");
+      $machine->sleep(10); # wait until Firefox draws the developer tool panel
+      $machine->succeed("xwininfo -root -tree | grep Valgrind");
       $machine->screenshot("screen");
     '';