Reftest should print both the test and the reference as part of its output. I think clean-reftest-report.pl should then strip the complete reference URL but still link to it as (<a>reference</a>). To keep the lines shorter, clean-reftest-report.pl should probably also strip layout/reftests/ and everything above it when printing the text inside the anchor.
Be sure to update layout/tools/reftest/README.txt when you make this change. 84 The only difference between <url> and <url_ref> is that results of 85 the test are reported using <url> only.