Fix timing issue in WebPage test.

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