mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Workarounds for tests with about:blank onloads (rebased)
This commit is contained in:
parent
47716cc1aa
commit
15e5aef631
5 changed files with 17 additions and 13 deletions
|
@ -659164,7 +659164,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/constructing-form-data-set.html": [
|
||||
"8dad6cdd01a43fa17694c67939e8e5a05ab529e2",
|
||||
"bff1c942c883cda6629c47eeda21c756c18603d3",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/form-data-set-empty-file.window.js": [
|
||||
|
@ -659196,7 +659196,7 @@
|
|||
"support"
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/form-submission-algorithm.html": [
|
||||
"2d5ac276374370dd594d3d8f98c1b85e8186eb26",
|
||||
"d31e24167013aa48bec0d17e462714dc559794e1",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/forms/form-submission-0/getactionurl.html": [
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
[constructing-form-data-set.html]
|
||||
[_charset_ control sets the expected encoding name.]
|
||||
expected: FAIL
|
||||
|
||||
[The button cannot be setted if it is not a submitter.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[form-submission-algorithm.html]
|
||||
[If form's firing submission events is true, then return; 'submit' event]
|
||||
expected: FAIL
|
||||
|
||||
[If form's firing submission events is true, then return; 'invalid' event]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -34,11 +34,13 @@ test(() => {
|
|||
}, 'FormData constructor always produces UTF-8 _charset_ value.');
|
||||
|
||||
async_test(t => {
|
||||
frame1.onload = t.step_func_done(() => {
|
||||
assert_not_equals(frame1.contentDocument.URL.indexOf('_charset_=windows-1252'), -1);
|
||||
frame1.onload = t.step_func(() => {
|
||||
if (frame1.contentWindow.location.href == "about:blank") { return; }
|
||||
assert_not_equals(frame1.contentDocument.URL.indexOf('_charset_=windows-1252'), -1,"should see _charset_=windows-1252 in "+frame1.contentDocument.URL);
|
||||
t.done();
|
||||
});
|
||||
form1.submit();
|
||||
}, '_charset_ control sets the expected encoding name.');
|
||||
},'_charset_ control sets the expected encoding name.');
|
||||
|
||||
async_test(t => {
|
||||
frame2.onload = t.step_func_done(() => {
|
||||
|
|
|
@ -60,8 +60,12 @@ async_test(t => {
|
|||
};
|
||||
submitter1.click();
|
||||
// We actually submit the form in order to check which 'click()' submits it.
|
||||
iframe.onload = t.step_func_done(() => {
|
||||
iframe.onload = t.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_not_equals(iframe.contentWindow.location.search.indexOf('n=i'), -1);
|
||||
t.done();
|
||||
});
|
||||
}, "If form's firing submission events is true, then return; 'submit' event");
|
||||
|
||||
|
@ -127,9 +131,13 @@ async_test(t => {
|
|||
// Request to load '/common/dummy.xhtml', and immediately submit the form to
|
||||
// the same frame. If the form submission is aborted, the first request
|
||||
// will be completed.
|
||||
iframe.onload = t.step_func_done(() => {
|
||||
// This may be complicated by loads of the initial about:blank;
|
||||
// we need to ignore them and only look at a load that isn't about:blank.
|
||||
iframe.onload = t.step_func(() => {
|
||||
if(iframe.contentWindow.location=="about:blank") { return; }
|
||||
wasLoaded = true;
|
||||
assert_true(iframe.contentWindow.location.search.indexOf('n1=v1') == -1);
|
||||
t.done();
|
||||
});
|
||||
iframe.src = '/common/dummy.xhtml';
|
||||
assert_false(wasLoaded, 'Make sure the first loading is ongoing.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue