Remove use of deprecated APIs

Also add a spec.
I would guess it would completely prevent `title-changed` from being used by the pane since the method is checked for before `.on` is.