Fix test: back-to-redirect-with-frame.php

In this test, the following lines looks legitimate, but they are not:
~~~
window.onload = setTimeout(function() {
    window.location = "resources/go-back.html"
}, 10);
~~~
The issue is that setTimeout is executed immediately instead of on load.

This CL wraps it into a function. It also reduces the timeout from 10ms
to 0ms.

Bug: 831155
Change-Id: I7e35fcaeedf918a29fa12ae1f8292d07e08ac213
Reviewed-on: https://chromium-review.googlesource.com/1051908
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557816}
1 file changed