CONSOLE MESSAGE: line 1: SomeError The test passes if window.onerror gets unsanitized information about the script error. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS msg.match(/SomeError/)[0] is "SomeError" PASS url is "http://localhost:8000/security/resources/cors-script.php?fail=true" PASS line is 1 PASS successfullyParsed is true TEST COMPLETE