Index: third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html |
diff --git a/third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html b/third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b1955a1c6ec2f35ba61842801f8b31947e575848 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html |
@@ -0,0 +1,22 @@ |
+<!DOCTYPE html> |
+<body> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+ |
+<iframe name="target"></iframe> |
+<form action="about:blank" onsubmit="this.submit(); return false;" target="target"> |
+ <input name="t" value="text"> |
+ <input type="submit" name="b" value="Next"> |
+</form> |
+ |
+<script> |
+var test = async_test('submit() in submit event handler should not contains a value of a submit button.'); |
+test.step(() => { |
+ var iframe = document.querySelector('iframe'); |
+ iframe.addEventListener('load', test.step_func(() => { |
+ assert_true(iframe.contentWindow.location.href.endsWith('?t=text')); |
+ test.done(); |
+ }), false); |
+ document.querySelector('input[type=submit]').click(); |
+}); |
+</script> |