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