Chromium Code Reviews| Index: LayoutTests/fast/forms/reportValidity-004.html |
| diff --git a/LayoutTests/fast/forms/reportValidity-004.html b/LayoutTests/fast/forms/reportValidity-004.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..75defefa8374101b96175ae413b529b80b6060ed |
| --- /dev/null |
| +++ b/LayoutTests/fast/forms/reportValidity-004.html |
| @@ -0,0 +1,38 @@ |
| +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
|
tkent
2014/10/22 01:14:15
The test name should be reportValidity-form-invali
Bartek Nowierski
2014/10/22 04:56:43
Done.
|
| +<html> |
| +<head> |
| +<script src="../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<p id="description"></p> |
| +<form method="get" id="sad_form"> |
| +<fieldset name="victim"> |
| +<input id="input-unset" name="victim" type="text" required/> |
| +</fieldset> |
| +<input name="victim" type="text" value="invalid" pattern="something"/> |
| +<button name="victim">lorem ipsum</button> |
| +<textarea name="victim" required></textarea> |
| +<select required> |
| + <option>empty</option> |
| + <option>another</option> |
| +</select> |
| +<select name="victim" required> |
| + <option value="" selected /> |
| + <option value="X">X</option> |
| +</select> |
| +<select name="victim" required> |
| + <option value="X">X</option> |
| + <option value="" selected /> |
| +</select> |
| +</form> |
| +<div id="console"></div> |
| +<script> |
| + |
| +description("This test checks if reportValidity() returns correctly a false (meaning there's an invalid element) result on form element."); |
| + |
| +f = document.getElementById("sad_form"); |
| +shouldBe("f.reportValidity()", "false"); |
| +shouldBe("document.activeElement", "document.getElementById('input-unset')"); |
| +</script> |
| +</body> |
| +</html> |