Regression tests for highlighting found terms

Includes a test for Bug 52680.

Change-Id: I37b480460415630ebedbaeab9519f9894e2e0bfd