Skip to content

Commit

Permalink
Make a workaround for the test with about:blank onload
Browse files Browse the repository at this point in the history
As jdm mentioned in servo/servo#22660 (comment), the initial about:blank load event can be fired before the form navigation occurs.
  • Loading branch information
CYBAI authored and servo-wpt-sync committed Jan 22, 2019
1 parent e4e6eee commit 55433bc
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -102,8 +102,12 @@
e.formData.append('h1', 'vh1');
});
let iframe = form.previousSibling;
iframe.onload = t1.step_func_done(() => {
iframe.onload = t1.step_func(() => {
// The initial about:blank load event can be fired before the form navigation occurs.
// See https://github.com/whatwg/html/issues/490 for more information.
if (iframe.contentWindow.location.href == "about:blank") { return; }
assert_true(iframe.contentWindow.location.search.indexOf('n1=v1&h1=vh1') != -1);
t1.done();
});
form.submit();
});
Expand Down

0 comments on commit 55433bc

Please sign in to comment.