mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Make a workaround for the test with about:blank onload
As jdm mentioned in https://github.com/servo/servo/pull/22660#discussion_r249597546, the initial about:blank load event can be fired before the form navigation occurs.
This commit is contained in:
parent
cb86d451e6
commit
3b9ab34600
3 changed files with 6 additions and 5 deletions
|
@ -102,8 +102,12 @@ t1.step(() => {
|
|||
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();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue