anchor.diff:        xdoScript = pkgs.writeText "${name}.xdo" text;
       in "${pkgs.xdotool}/bin/xdotool '${xdoScript}'";
     in ''
  +    # Run as user alice
  +    sub ru ($) {
  +      my $esc = $_[0] =~ s/'/'\\${"'"}'/gr;
  +      return "su - alice -c '$esc'";
  +    }
  +
       sub createNewWin {
         $machine->nest("creating a new Chromium window", sub {
  -        $machine->execute("${xdo "new-window" ''
  +        $machine->execute(ru "${xdo "new-window" ''
             search --onlyvisible --name "startup done"
             windowfocus --sync
             windowactivate --sync
           ''}");
  -        $machine->execute("${xdo "new-window" ''
  +        $machine->execute(ru "${xdo "new-window" ''
             key Ctrl+n
           ''}");
         });
  
positive.code:     $machine->waitForX;
  
      my $url = "file://${startupHTML}";
      my $args = "--user-data-dir=/tmp/chromium-${channel}";
      $machine->execute(
        "ulimit -c unlimited; ".
        "chromium $args \"$url\" & disown"
      );
      $machine->waitForText(qr/startup done/);
      $machine->waitUntilSucceeds("${xdo "check-startup" ''
        search --sync --onlyvisible --name "startup done"
        # close first start help popup
        key -delay 1000 Escape
  
negative.code:     $machine->screenshot("startup_done");
  
      testNewWin "check sandbox", sub {
        $machine->succeed(ru "${xdo "type-url" ''
          search --sync --onlyvisible --name "new tab"
          windowfocus --sync
          type --delay 1000 "chrome://sandbox"
        ''}");
  
        $machine->succeed(ru "${xdo "submit-url" ''
          search --sync --onlyvisible --name "new tab"
          windowfocus --sync
          key --delay 1000 Return
  