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

Unified Diff: LayoutTests/fast/forms/implicit-submission.html

Issue 171603007: Allow form submission for forms with "hidden" for submit with enter key (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing text expectation file added Created 6 years, 10 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 | LayoutTests/fast/forms/implicit-submission-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/implicit-submission.html
diff --git a/LayoutTests/fast/forms/implicit-submission.html b/LayoutTests/fast/forms/implicit-submission.html
index 4d3ff5b19bf06e69f77dc4f8300853904cfb6249..10d1e1f878dc9faf10689e0b78c1d6848d313897 100644
--- a/LayoutTests/fast/forms/implicit-submission.html
+++ b/LayoutTests/fast/forms/implicit-submission.html
@@ -33,7 +33,8 @@ var allTests = [
[ "Text field and single select, text focused", "!text,select", "y" ],
[ "Text field and single select, select focused", "text,!select", "n" ],
[ "Multiple text inputs with a button", "!text,text,button", "y"],
- [ "Multiple text inputs with a disabled button", "!text,text,-button", "n"]
+ [ "Multiple text inputs with a disabled button", "!text,text,-button", "n"],
+ [ "Multiple text inputs with a hidden submit", "!text,text,?submit", "y"]
];
if (window.testRunner) {
@@ -95,6 +96,11 @@ function buildAndTestForm(arena, inputs, description)
type = type.substr(1);
focused = true;
}
+ var hidden;
+ if (type[0] == '?') {
+ type = type.substr(1);
+ hidden = true;
+ }
var disabled;
if (type[0] == '-') {
type = type.substr(1);
@@ -119,6 +125,8 @@ function buildAndTestForm(arena, inputs, description)
}
control.id = focused ? "focused" : ("input" + i);
control.disabled = !!disabled;
+ if (hidden)
+ control.style.display = 'none';
form.appendChild(control);
});
var input = document.getElementById("focused");
« no previous file with comments | « no previous file | LayoutTests/fast/forms/implicit-submission-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698