Chromium Code Reviews| Index: LayoutTests/fast/dom/HTMLInputElement/input-type-attribute.html |
| diff --git a/LayoutTests/fast/dom/HTMLInputElement/input-type-attribute.html b/LayoutTests/fast/dom/HTMLInputElement/input-type-attribute.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e51f4e3e07eba003c8fae14235656b88be1a30a |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/HTMLInputElement/input-type-attribute.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE HTML> |
|
tkent
2014/02/05 23:58:18
Please merge these tests to fast/forms/input-type-
sof
2014/02/06 08:27:15
Thanks, done (is the readonly-ness of this and oth
tkent
2014/02/06 08:29:38
None :-) It's a local rule in the Forms team.
|
| +<script src="../../../resources/js-test.js"></script> |
| +<script> |
| +description('HTMLInputElement type attribute test'); |
| + |
| +var input = document.createElement("input"); |
| + |
| +shouldBeEqualToString("input.type", "text"); |
| +shouldBeNull("input.getAttribute('type')"); |
| +shouldBeEqualToString("input.setAttribute('type', '-1'); input.type", "text"); |
| +shouldBeEqualToString("input.setAttribute('type', 'foo'); input.getAttribute('type')", "foo"); |
| +shouldBeEqualToString("input.type = 'x-unknown'; input.type", "text"); |
| +shouldBeEqualToString("input.type = 'x-unknown'; input.getAttribute('type')", "x-unknown"); |
| +shouldBeEqualToString("input.type = ''; input.type", "text"); |
| +shouldBeEqualToString("input.type = ''; input.getAttribute('type')", ""); |
| +shouldBeEqualToString("input.setAttribute('type', ''); input.type", "text"); |
| +shouldBeEqualToString("input.setAttribute('type', ''); input.getAttribute('type')", ""); |
| +shouldBeEqualToString("input.removeAttribute('type'); input.type", "text"); |
| +shouldBeNull("input.removeAttribute('type'); input.getAttribute('type')"); |
| +shouldBeEqualToString("input.setAttribute('type', 'rANGE'); input.type", "range"); |
| +shouldBeEqualToString("input.setAttribute('type', 'Range'); input.getAttribute('type')", "Range"); |
| +shouldBeEqualToString("input.setAttribute('type', 'rANGEr'); input.type", "text"); |
| +</script> |