This depends on some customization of mine. Here's a -Q recipe using a
distillation of my init.
Let /tmp/title-redisplay.el have content:
(defun my-get-buffer-name ()
"Get the buffer name. "
(file-name-nondirectory (or (buffer-file-name)
(buffer-name)
default-directory)))
(setq-default frame-title-format '(:eval (my-get-buffer-name)))
(add-hook 'emacs-startup-hook 'delete-other-windows)
(global-set-key (kbd "<f4>") 'ff-find-other-file)
cd to the src directory of the Emacs source tree and:
./emacs -Q --load /tmp/title-redisplay.el character.h character.c
Then f4, and you'll see the frame title doesn't update.