This allows us to create "text tests" in addition to "layout tests". Text tests work the same as layout tests, but dump the document content as text and exit upon receiving the window "load" event.