This seems similar to testInIframe. It seems inconsistent to use a helper function for one and not the other. Why?