diff options
-rw-r--r-- | components/script/dom/htmlformelement.rs | 3 | ||||
-rw-r--r-- | tests/wpt/mozilla/meta/MANIFEST.json | 6 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/mozilla/form_submit_about.html | 15 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html | 13 |
4 files changed, 36 insertions, 1 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 8069cafe932..dda93487caf 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -209,7 +209,8 @@ impl HTMLFormElement { load_data.data = Some(parsed_data.into_bytes()); }, // https://html.spec.whatwg.org/multipage/#submit-get-action - ("ftp", _) | ("javascript", _) | ("data", FormMethod::FormGet) => (), + ("file", _) | ("about", _) | ("data", FormMethod::FormGet) | + ("ftp", _) | ("javascript", _) => (), _ => return // Unimplemented (data and mailto) } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index e96f940dda4..7aaa534b278 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -5535,6 +5535,12 @@ "url": "/_mozilla/mozilla/follow-hyperlink.html" } ], + "mozilla/form_submit_about.html": [ + { + "path": "mozilla/form_submit_about.html", + "url": "/_mozilla/mozilla/form_submit_about.html" + } + ], "mozilla/getBoundingClientRect.html": [ { "path": "mozilla/getBoundingClientRect.html", diff --git a/tests/wpt/mozilla/tests/mozilla/form_submit_about.html b/tests/wpt/mozilla/tests/mozilla/form_submit_about.html new file mode 100644 index 00000000000..ec572ab0bc6 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/form_submit_about.html @@ -0,0 +1,15 @@ +<html> + <head> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + </head> + <body> + <iframe src="form_submit_about_frame.html" id="foo"></iframe> + <script> + var numOnLoads = 0 + var t = async_test("about:blank as form target") + var iframe = document.getElementById('foo') + iframe.onload = t.step_func(function(e) { if (++numOnLoads == 2) t.done() }) + </script> + </body> +</html> diff --git a/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html b/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html new file mode 100644 index 00000000000..7beb90f1ab7 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/form_submit_about_frame.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <body> + <form name="my" action="about:blank"> + <input type="submit" value="Submit about:blank"/> + </form> + <script> + window.onload = function() { + document.forms["my"].submit(); + } + </script> + </body> +</html> |