This tests WebKit preserves non-directional selection after unapplying replacement on Mac. To manually test on Mac,

  1. Select "world" by double-clicking the word
  2. Replace "world" by a character by pressing a key
  3. Undo
  4. Extend selection to the left

" world" should be selected.

hello world WebKit