Update tests to ensure they do not timeout

Changes that remain relevant from old pull request https://github.com/w3c/web-platform-tests/pull/555, https://critic.hoppipolla.co.uk/r/623).