summaryrefslogtreecommitdiffstats
path: root/nixos/tests/chromium.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-05-22 11:23:09 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-05-22 11:23:09 +0200
commit5f50f23013a62af86b211bb89e1ce60421ba9fe8 (patch)
tree1a9d4cfb5422c76077f0522e67a702a72f6326f4 /nixos/tests/chromium.nix
parentdfbd1ddb8beb5f49470770eb5511db1fd7e424c1 (diff)
nixos/tests/chromium: Detect popup using OCR.
This will make the test a lot more reliable, because we no longer need to press ESC multiple times hoping that it will close the popup. Unfortunately in order to run this test I needed to locally revert the gyp update from a305e6855dd8723683c77635f45ae28411c8f36c. With the old gyp version however the test runs fine and it's able to properly detect the popup. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/chromium.nix')
-rw-r--r--nixos/tests/chromium.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix
index 026433fc7ee9..2241bc9c3bca 100644
--- a/nixos/tests/chromium.nix
+++ b/nixos/tests/chromium.nix
@@ -9,6 +9,8 @@ import ./make-test.nix (
}: rec {
name = "chromium";
+ enableOCR = true;
+
machine.imports = [ ./common/x11.nix ];
machine.virtualisation.memorySize = 1024;
@@ -106,15 +108,11 @@ import ./make-test.nix (
"ulimit -c unlimited; ".
"$pkg/bin/chromium $args \"$url\" & disown"
);
+ $machine->waitForText(qr/Type to search or enter a URL to navigate/);
$machine->waitUntilSucceeds("${xdo "check-startup" ''
search --sync --onlyvisible --name "startup done"
# close first start help popup
key -delay 1000 Escape
- # XXX: This is to make sure the popup is closed, but we better do
- # screenshots to detect visual changes.
- key -delay 2000 Escape
- key -delay 3000 Escape
- key -delay 4000 Escape
windowfocus --sync
windowactivate --sync
''}");