Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/form-submit-in-submit-event.html

Issue 2340213002: submit() in submit event handler should not contains a value of a submit button. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLButtonElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLButtonElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698