anchor.diff:          machine.succeed(
               ru(
                   "${xdo "submit-url" ''
  -                  search --sync --onlyvisible --name "new tab"
  +                  search --sync --onlyvisible --name "New Tab"
                     windowfocus --sync
                     key --delay 1000 Return
                   ''}"
  
positive.code:         )
      )
  
      create_and_wait_for_new_win()
      machine.screenshot("empty_windows")
      close_win()
  
      machine.screenshot("startup_done")
  
  
negative.code: 
  
      def create_new_win():
          """Creates a new Chromium window."""
          with machine.nested("Creating a new Chromium window"):
              machine.wait_until_succeeds(
                  ru(
                      "${xdo "create_new_win-select_main_window" ''
                        search --onlyvisible --name "startup done"
                        windowfocus --sync
                        windowactivate --sync
                      ''}"
                  )
              )
              machine.send_key("ctrl-n")
              # Wait until the new window appears:
              machine.wait_until_succeeds(
                  ru(
                      "${xdo "create_new_win-wait_for_window" ''
                        search --onlyvisible --name "New Tab"
                        windowfocus --sync
                        windowactivate --sync
                      ''}"
                  )
              )
  
  
      def close_new_tab_win():
          """Closes the Chromium window with the title "New Tab"."""
          machine.wait_until_succeeds(
              ru(
                  "${xdo "close_new_tab_win-select_main_window" ''
                    search --onlyvisible --name "New Tab"
                    windowfocus --sync
                    windowactivate --sync
                  ''}"
              )
          )
          machine.send_key("ctrl-w")
          # Wait until the closed window disappears:
          machine.wait_until_fails(
              ru(
                  "${xdo "close_new_tab_win-wait_for_close" ''
                    search --onlyvisible --name "New Tab"
                  ''}"
              )
          )
  
  
      @contextmanager
      def test_new_win(description):
          create_new_win()
          with machine.nested(description):
              yield
          # Close the newly created window:
          machine.send_key("ctrl-w")
  
  
      machine.wait_for_x()
  