Made rendering test code independent of target and rendering method.