blob: e8a5e2bd7ce6a279ec803103f627c074b5b3bc10 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<body>
<script>
description('HTMLInputElement size attribute test');
var input = document.createElement("input");
shouldBe("input.size", "20");
shouldBe("input.setAttribute('size', '-1'); input.size", "20");
shouldBe("input.removeAttribute('size'); input.size", "20");
shouldBe("input.setAttribute('size', '1'); input.size", "1");
shouldBe("input.setAttribute('size', '2'); input.size", "2");
shouldBe("input.removeAttribute('size'); input.size", "20");
shouldBe("input.setAttribute('size', 'a'); input.size", "20");
shouldBe("input.removeAttribute('size'); input.size", "20");
shouldBe("input.setAttribute('size', '0'); input.size", "20");
shouldBe("input.setAttribute('size', '10'); input.size", "10");
shouldThrow("input.size = 0", "'Error: IndexSizeError: DOM Exception 1'");
</script>
</body>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>