aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSagar Muchhal <muchhalsagar88@gmail.com>2016-03-18 19:53:34 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-03-24 09:07:38 -0400
commit051ffba0e5dd22b779a059be164a9748e305496c (patch)
treefa23afb077ba83a415d4cd083d129868694874f8 /tests
parent7a9dc577617b442ff0fe07eaa683207234c519ee (diff)
downloadservo-051ffba0e5dd22b779a059be164a9748e305496c.tar.gz
servo-051ffba0e5dd22b779a059be164a9748e305496c.zip
Implement initial pieces of form validation.
Diffstat (limited to 'tests')
-rw-r--r--tests/html/form_html5_validations.html29
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini33
2 files changed, 29 insertions, 33 deletions
diff --git a/tests/html/form_html5_validations.html b/tests/html/form_html5_validations.html
new file mode 100644
index 00000000000..edbbabd68d3
--- /dev/null
+++ b/tests/html/form_html5_validations.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ Required: <input type="text" name="name" required><br>
+ Email : <input type="email" name="email"><br>
+ URL : <input type="url" name="email"><br>
+ Number(18-99): <input type="number" size="6" name="age" min="18" max="99"><br>
+ Pattern(MM/DD/YYYY): <input type="text" pattern="\d{1,2}/\d{1,2}/\d{4}"><br>
+ Length(10-20): <input minlength="10" maxlength="20"><br>
+ Length(10-20): <textarea required minlength="10" maxlength="20"></textarea><br>
+ Step(3.11)<input type="number" min="0" step="3.11"><br>
+ Required Select: <select required>
+ <option></option>
+ <option value="0">A</option>
+ <option value="1">B</option>
+ <option value="2">C</option>
+ </select><br>
+ Required Radio: <input type="radio" name="group1" value="1" required>1
+ <input type="radio" name="group1" value="2">2
+ <input type="radio" name="group1" value="3">3<br>
+ Required Checkbox: <input type="checkbox" name="group2" value="1" required>1
+ <input type="checkbox" name="group2" value="2">2
+ <input type="checkbox" name="group2" value="3">3<br>
+ Required File: <input type="file" required><br>
+ <input type="submit">
+ </form>
+ </body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 7969f4095d5..ab48c269929 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -5346,39 +5346,6 @@
[AutocompleteErrorEvent interface: attribute reason]
expected: FAIL
- [ValidityState interface: attribute valueMissing]
- expected: FAIL
-
- [ValidityState interface: attribute typeMismatch]
- expected: FAIL
-
- [ValidityState interface: attribute patternMismatch]
- expected: FAIL
-
- [ValidityState interface: attribute tooLong]
- expected: FAIL
-
- [ValidityState interface: attribute tooShort]
- expected: FAIL
-
- [ValidityState interface: attribute rangeUnderflow]
- expected: FAIL
-
- [ValidityState interface: attribute rangeOverflow]
- expected: FAIL
-
- [ValidityState interface: attribute stepMismatch]
- expected: FAIL
-
- [ValidityState interface: attribute badInput]
- expected: FAIL
-
- [ValidityState interface: attribute customError]
- expected: FAIL
-
- [ValidityState interface: attribute valid]
- expected: FAIL
-
[ValidityState must be primary interface of document.createElement("input").validity]
expected: FAIL