Port the test to check for resource received upon error.

https://github.com/ariya/phantomjs/issues/12439
Port the test to abort network request.

https://github.com/ariya/phantomjs/issues/12439
Port the test for onRepaintRequested handler.

https://github.com/ariya/phantomjs/issues/12439