Factor data out of _check_titles

The straight-line implementation style of this test method allows
inconsistencies in checking to creep in. Switch to a data-driven
approach.

Change-Id: I8cd2be14f4338413854042031cf41da534c11dcb