| Index: LayoutTests/fast/js/webidl-type-mapping.html
|
| diff --git a/LayoutTests/fast/js/webidl-type-mapping.html b/LayoutTests/fast/js/webidl-type-mapping.html
|
| index d811e5c14f1e4a0617071db84629cd229d892ce3..644886d1cbe0b4edba2955a61c9a78c072c3d674 100644
|
| --- a/LayoutTests/fast/js/webidl-type-mapping.html
|
| +++ b/LayoutTests/fast/js/webidl-type-mapping.html
|
| @@ -325,5 +325,109 @@ testNonNumericToNumericEnforceRange(type);
|
| convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
|
| debug("");
|
|
|
| +type = "testByte";
|
| +verifyAttribute(type);
|
| +convert(type, "0");
|
| +convert(type, "-1");
|
| +convert(type, "1");
|
| +convert(type, "0x7F");
|
| +convert(type, "0x80", "-0x80");
|
| +convert(type, "-0x7F");
|
| +convert(type, "-0x80");
|
| +convert(type, "-0x81", "0x7F");
|
| +convert(type, "0x1234", "0x34");
|
| +convert(type, "Number.MIN_VALUE", "0");
|
| +convert(type, "-Number.MIN_VALUE", "0");
|
| +convert(type, "Number.MAX_VALUE", "0");
|
| +convert(type, "-Number.MAX_VALUE", "0");
|
| +convert(type, "1.99", "1");
|
| +convert(type, "-1.99", "-1");
|
| +convert(type, "4660.99", "0x34");
|
| +convert(type, "Infinity", "0");
|
| +convert(type, "-Infinity", "0");
|
| +convert(type, "NaN", "0");
|
| +testNonNumericToNumeric(type);
|
| +convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
|
| +debug("");
|
| +
|
| +type = "testEnforceRangeByte";
|
| +verifyAttribute(type);
|
| +convert(type, "0");
|
| +convert(type, "-1");
|
| +convert(type, "1");
|
| +convert(type, "0x7F");
|
| +convertThrows(type, "0x80");
|
| +convert(type, "-0x7F");
|
| +convert(type, "-0x80");
|
| +convertThrows(type, "-0x81");
|
| +convertThrows(type, "0x1234");
|
| +convert(type, "Number.MIN_VALUE", "0");
|
| +convert(type, "-Number.MIN_VALUE", "0");
|
| +convertThrows(type, "Number.MAX_VALUE");
|
| +convertThrows(type, "-Number.MAX_VALUE");
|
| +convert(type, "1.99", "1");
|
| +convert(type, "-1.99", "-1");
|
| +convertThrows(type, "4660.99");
|
| +convertThrows(type, "Infinity");
|
| +convertThrows(type, "-Infinity");
|
| +convertThrows(type, "NaN");
|
| +testNonNumericToNumericEnforceRange(type);
|
| +convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
|
| +debug("");
|
| +
|
| +type = "testOctet";
|
| +verifyAttribute(type);
|
| +convert(type, "0");
|
| +convert(type, "-1", "0xFF");
|
| +convert(type, "1");
|
| +convert(type, "0x7F");
|
| +convert(type, "0x80");
|
| +convert(type, "0xFF");
|
| +convert(type, "0x100", "0");
|
| +convert(type, "0x101", "1");
|
| +convert(type, "-0x80", "0x80");
|
| +convert(type, "-0x81", "0x7F");
|
| +convert(type, "0x1234", "0x34");
|
| +convert(type, "Number.MAX_VALUE", "0");
|
| +convert(type, "Number.MIN_VALUE", "0");
|
| +convert(type, "-Number.MAX_VALUE", "0");
|
| +convert(type, "-Number.MIN_VALUE", "0");
|
| +convert(type, "1.99", "1");
|
| +convert(type, "-1.99", "0xFF");
|
| +convert(type, "4660.99", "0x34");
|
| +convert(type, "Infinity", "0");
|
| +convert(type, "-Infinity", "0");
|
| +convert(type, "NaN", "0");
|
| +testNonNumericToNumeric(type);
|
| +convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
|
| +debug("");
|
| +
|
| +type = "testEnforceRangeOctet";
|
| +verifyAttribute(type);
|
| +convert(type, "0");
|
| +convertThrows(type, "-1");
|
| +convert(type, "1");
|
| +convert(type, "0x7F");
|
| +convert(type, "0x80");
|
| +convert(type, "0xFF");
|
| +convertThrows(type, "0x100");
|
| +convertThrows(type, "0x101");
|
| +convertThrows(type, "-0x80");
|
| +convertThrows(type, "-0x81");
|
| +convertThrows(type, "0x1234");
|
| +convertThrows(type, "Number.MAX_VALUE");
|
| +convert(type, "Number.MIN_VALUE", "0");
|
| +convertThrows(type, "-Number.MAX_VALUE");
|
| +convert(type, "-Number.MIN_VALUE", "0");
|
| +convert(type, "1.99", "1");
|
| +convertThrows(type, "-1.99");
|
| +convertThrows(type, "4660.99");
|
| +convertThrows(type, "Infinity");
|
| +convertThrows(type, "-Infinity");
|
| +convertThrows(type, "NaN");
|
| +testNonNumericToNumericEnforceRange(type);
|
| +convertThrows(type, "{valueOf:function(){throw new Error('custom');}}");
|
| +debug("");
|
| +
|
| </script>
|
| <script src="resources/js-test-post.js"></script>
|
|
|