According to test harness documentation callback functions should be "wrapped" by step_func(), which should be called on test instance, returned by async_test().
This test instance is not available, if function testInIFrame() is used.
So there are two options: pass test instance as argument from testInIFrame() or implement test without testInIFrame().  I selected the second way, because the situation is quite rare and it it does not worth refactoring testInIFrame() and all tests, that using it.