Bug 894547 - move tests abstraction up for at caret offset text testing, r=tbsaunde