Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: LayoutTests/fast/js/webidl-type-mapping-expected.txt

Issue 54903014: [EnforceRange] doesn't enforce range of a short (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extend layout test Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/js/webidl-type-mapping-expected.txt
diff --git a/LayoutTests/fast/js/webidl-type-mapping-expected.txt b/LayoutTests/fast/js/webidl-type-mapping-expected.txt
index 0132b53938dbec76c554f07fb6d5370dc37f1a12..7f703f71bcd88988ad173201299e0bc1d8339bef 100644
--- a/LayoutTests/fast/js/webidl-type-mapping-expected.txt
+++ b/LayoutTests/fast/js/webidl-type-mapping-expected.txt
@@ -9,6 +9,8 @@ PASS 'testLong' in converter is true
PASS typeof converter.testLong === 'number' is true
converter.testLong = 0
PASS converter.testLong is 0
+converter.testLong = -0
+PASS converter.testLong is 0
converter.testLong = -1
PASS converter.testLong is -1
converter.testLong = 1
@@ -83,6 +85,8 @@ PASS 'testEnforceRangeLong' in converter is true
PASS typeof converter.testEnforceRangeLong === 'number' is true
converter.testEnforceRangeLong = 0
PASS converter.testEnforceRangeLong is 0
+converter.testEnforceRangeLong = -0
+PASS converter.testEnforceRangeLong is 0
converter.testEnforceRangeLong = -1
PASS converter.testEnforceRangeLong is -1
converter.testEnforceRangeLong = 1
@@ -146,6 +150,8 @@ PASS 'testUnsignedLong' in converter is true
PASS typeof converter.testUnsignedLong === 'number' is true
converter.testUnsignedLong = 0
PASS converter.testUnsignedLong is 0
+converter.testUnsignedLong = -0
+PASS converter.testUnsignedLong is 0
converter.testUnsignedLong = -1
PASS converter.testUnsignedLong is 0xFFFFFFFF
converter.testUnsignedLong = 1
@@ -220,6 +226,8 @@ PASS 'testEnforceRangeUnsignedLong' in converter is true
PASS typeof converter.testEnforceRangeUnsignedLong === 'number' is true
converter.testEnforceRangeUnsignedLong = 0
PASS converter.testEnforceRangeUnsignedLong is 0
+converter.testEnforceRangeUnsignedLong = -0
+PASS converter.testEnforceRangeUnsignedLong is 0
PASS converter.testEnforceRangeUnsignedLong = -1 threw exception TypeError: Type error.
converter.testEnforceRangeUnsignedLong = 1
PASS converter.testEnforceRangeUnsignedLong is 1
@@ -278,6 +286,8 @@ PASS 'testLongLong' in converter is true
PASS typeof converter.testLongLong === 'number' is true
converter.testLongLong = 0
PASS converter.testLongLong is 0
+converter.testLongLong = -0
+PASS converter.testLongLong is 0
converter.testLongLong = -1
PASS converter.testLongLong is -1
converter.testLongLong = 1
@@ -352,6 +362,8 @@ PASS 'testEnforceRangeLongLong' in converter is true
PASS typeof converter.testEnforceRangeLongLong === 'number' is true
converter.testEnforceRangeLongLong = 0
PASS converter.testEnforceRangeLongLong is 0
+converter.testEnforceRangeLongLong = -0
+PASS converter.testEnforceRangeLongLong is 0
converter.testEnforceRangeLongLong = -1
PASS converter.testEnforceRangeLongLong is -1
converter.testEnforceRangeLongLong = 1
@@ -418,6 +430,8 @@ PASS 'testUnsignedLongLong' in converter is true
PASS typeof converter.testUnsignedLongLong === 'number' is true
converter.testUnsignedLongLong = 0
PASS converter.testUnsignedLongLong is 0
+converter.testUnsignedLongLong = -0
+PASS converter.testUnsignedLongLong is 0
converter.testUnsignedLongLong = -1
PASS converter.testUnsignedLongLong is 0xFFFFFFFFFFFFFFFF
converter.testUnsignedLongLong = 1
@@ -492,6 +506,8 @@ PASS 'testEnforceRangeUnsignedLongLong' in converter is true
PASS typeof converter.testEnforceRangeUnsignedLongLong === 'number' is true
converter.testEnforceRangeUnsignedLongLong = 0
PASS converter.testEnforceRangeUnsignedLongLong is 0
+converter.testEnforceRangeUnsignedLongLong = -0
+PASS converter.testEnforceRangeUnsignedLongLong is 0
PASS converter.testEnforceRangeUnsignedLongLong = -1 threw exception TypeError: Type error.
converter.testEnforceRangeUnsignedLongLong = 1
PASS converter.testEnforceRangeUnsignedLongLong is 1
@@ -550,6 +566,8 @@ PASS 'testByte' in converter is true
PASS typeof converter.testByte === 'number' is true
converter.testByte = 0
PASS converter.testByte is 0
+converter.testByte = -0
+PASS converter.testByte is 0
converter.testByte = -1
PASS converter.testByte is -1
converter.testByte = 1
@@ -566,6 +584,8 @@ converter.testByte = -0x81
PASS converter.testByte is 0x7F
converter.testByte = 0x1234
PASS converter.testByte is 0x34
+converter.testByte = 0xDCBA9876543210
+PASS converter.testByte is 0x10
converter.testByte = Number.MIN_VALUE
PASS converter.testByte is 0
converter.testByte = -Number.MIN_VALUE
@@ -606,6 +626,8 @@ PASS 'testEnforceRangeByte' in converter is true
PASS typeof converter.testEnforceRangeByte === 'number' is true
converter.testEnforceRangeByte = 0
PASS converter.testEnforceRangeByte is 0
+converter.testEnforceRangeByte = -0
+PASS converter.testEnforceRangeByte is 0
converter.testEnforceRangeByte = -1
PASS converter.testEnforceRangeByte is -1
converter.testEnforceRangeByte = 1
@@ -651,6 +673,8 @@ PASS 'testOctet' in converter is true
PASS typeof converter.testOctet === 'number' is true
converter.testOctet = 0
PASS converter.testOctet is 0
+converter.testOctet = -0
+PASS converter.testOctet is 0
converter.testOctet = -1
PASS converter.testOctet is 0xFF
converter.testOctet = 1
@@ -671,6 +695,8 @@ converter.testOctet = -0x81
PASS converter.testOctet is 0x7F
converter.testOctet = 0x1234
PASS converter.testOctet is 0x34
+converter.testOctet = 0xDCBA9876543210
+PASS converter.testOctet is 0x10
converter.testOctet = Number.MAX_VALUE
PASS converter.testOctet is 0
converter.testOctet = Number.MIN_VALUE
@@ -711,6 +737,8 @@ PASS 'testEnforceRangeOctet' in converter is true
PASS typeof converter.testEnforceRangeOctet === 'number' is true
converter.testEnforceRangeOctet = 0
PASS converter.testEnforceRangeOctet is 0
+converter.testEnforceRangeOctet = -0
+PASS converter.testEnforceRangeOctet is 0
PASS converter.testEnforceRangeOctet = -1 threw exception TypeError: Type error.
converter.testEnforceRangeOctet = 1
PASS converter.testEnforceRangeOctet is 1
@@ -752,6 +780,249 @@ PASS converter.testEnforceRangeOctet is 0
PASS converter.testEnforceRangeOctet = undefined threw exception TypeError: Type error.
PASS converter.testEnforceRangeOctet = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
+PASS 'testShort' in converter is true
+PASS typeof converter.testShort === 'number' is true
+converter.testShort = 0
+PASS converter.testShort is 0
+converter.testShort = -0
+PASS converter.testShort is 0
+converter.testShort = -1
+PASS converter.testShort is -1
+converter.testShort = 1
+PASS converter.testShort is 1
+converter.testShort = 0x7F
+PASS converter.testShort is 0x7F
+converter.testShort = 0x80
+PASS converter.testShort is 0x80
+converter.testShort = 0xFF
+PASS converter.testShort is 0xFF
+converter.testShort = -0x80
+PASS converter.testShort is -0x80
+converter.testShort = -0x81
+PASS converter.testShort is -0x81
+converter.testShort = 0x7FFF
+PASS converter.testShort is 0x7FFF
+converter.testShort = 0x8000
+PASS converter.testShort is -0x8000
+converter.testShort = 0xFFFF
+PASS converter.testShort is -1
+converter.testShort = -0x8000
+PASS converter.testShort is -0x8000
+converter.testShort = -0x8001
+PASS converter.testShort is 0x7FFF
+converter.testShort = 0xDCBA9876543210
+PASS converter.testShort is 0x3210
+converter.testShort = Number.MAX_VALUE
+PASS converter.testShort is 0
+converter.testShort = Number.MIN_VALUE
+PASS converter.testShort is 0
+converter.testShort = -Number.MAX_VALUE
+PASS converter.testShort is 0
+converter.testShort = -Number.MIN_VALUE
+PASS converter.testShort is 0
+converter.testShort = 1.99
+PASS converter.testShort is 1
+converter.testShort = -1.99
+PASS converter.testShort is -1
+converter.testShort = Infinity
+PASS converter.testShort is 0
+converter.testShort = -Infinity
+PASS converter.testShort is 0
+converter.testShort = NaN
+PASS converter.testShort is 0
+converter.testShort = false
+PASS converter.testShort is 0
+converter.testShort = true
+PASS converter.testShort is 1
+converter.testShort = ''
+PASS converter.testShort is 0
+converter.testShort = '1'
+PASS converter.testShort is 1
+converter.testShort = 'abc'
+PASS converter.testShort is 0
+converter.testShort = null
+PASS converter.testShort is 0
+converter.testShort = undefined
+PASS converter.testShort is 0
+PASS converter.testShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
+
+PASS 'testEnforceRangeShort' in converter is true
+PASS typeof converter.testEnforceRangeShort === 'number' is true
+converter.testEnforceRangeShort = 0
+PASS converter.testEnforceRangeShort is 0
+converter.testEnforceRangeShort = -0
+PASS converter.testEnforceRangeShort is 0
+converter.testEnforceRangeShort = -1
+PASS converter.testEnforceRangeShort is -1
+converter.testEnforceRangeShort = 1
+PASS converter.testEnforceRangeShort is 1
+converter.testEnforceRangeShort = 0x7F
+PASS converter.testEnforceRangeShort is 0x7F
+converter.testEnforceRangeShort = 0x80
+PASS converter.testEnforceRangeShort is 0x80
+converter.testEnforceRangeShort = 0xFF
+PASS converter.testEnforceRangeShort is 0xFF
+converter.testEnforceRangeShort = -0x80
+PASS converter.testEnforceRangeShort is -0x80
+converter.testEnforceRangeShort = -0x81
+PASS converter.testEnforceRangeShort is -0x81
+converter.testEnforceRangeShort = 0x7FFF
+PASS converter.testEnforceRangeShort is 0x7FFF
+PASS converter.testEnforceRangeShort = 0x8000 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = 0xFFFF threw exception TypeError: Type error.
+converter.testEnforceRangeShort = -0x8000
+PASS converter.testEnforceRangeShort is -0x8000
+PASS converter.testEnforceRangeShort = -0x8001 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = 0xDCBA9876543210 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = Number.MAX_VALUE threw exception TypeError: Type error.
+converter.testEnforceRangeShort = Number.MIN_VALUE
+PASS converter.testEnforceRangeShort is 0
+PASS converter.testEnforceRangeShort = -Number.MAX_VALUE threw exception TypeError: Type error.
+converter.testEnforceRangeShort = -Number.MIN_VALUE
+PASS converter.testEnforceRangeShort is 0
+converter.testEnforceRangeShort = 1.99
+PASS converter.testEnforceRangeShort is 1
+converter.testEnforceRangeShort = -1.99
+PASS converter.testEnforceRangeShort is -1
+PASS converter.testEnforceRangeShort = Infinity threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = -Infinity threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = NaN threw exception TypeError: Type error.
+converter.testEnforceRangeShort = false
+PASS converter.testEnforceRangeShort is 0
+converter.testEnforceRangeShort = true
+PASS converter.testEnforceRangeShort is 1
+converter.testEnforceRangeShort = ''
+PASS converter.testEnforceRangeShort is 0
+converter.testEnforceRangeShort = '1'
+PASS converter.testEnforceRangeShort is 1
+PASS converter.testEnforceRangeShort = 'abc' threw exception TypeError: Type error.
+converter.testEnforceRangeShort = null
+PASS converter.testEnforceRangeShort is 0
+PASS converter.testEnforceRangeShort = undefined threw exception TypeError: Type error.
+PASS converter.testEnforceRangeShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
+
+PASS 'testUnsignedShort' in converter is true
+PASS typeof converter.testUnsignedShort === 'number' is true
+converter.testUnsignedShort = 0
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -0
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -1
+PASS converter.testUnsignedShort is 0xFFFF
+converter.testUnsignedShort = 1
+PASS converter.testUnsignedShort is 1
+converter.testUnsignedShort = 0x7F
+PASS converter.testUnsignedShort is 0x7F
+converter.testUnsignedShort = 0x80
+PASS converter.testUnsignedShort is 0x80
+converter.testUnsignedShort = 0xFF
+PASS converter.testUnsignedShort is 0xFF
+converter.testUnsignedShort = -0x80
+PASS converter.testUnsignedShort is 0xFF80
+converter.testUnsignedShort = -0x81
+PASS converter.testUnsignedShort is 0xFF7F
+converter.testUnsignedShort = 0x7FFF
+PASS converter.testUnsignedShort is 0x7FFF
+converter.testUnsignedShort = 0x8000
+PASS converter.testUnsignedShort is 0x8000
+converter.testUnsignedShort = 0xFFFF
+PASS converter.testUnsignedShort is 0xFFFF
+converter.testUnsignedShort = 0x10000
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -0x8000
+PASS converter.testUnsignedShort is 0x8000
+converter.testUnsignedShort = -0x8001
+PASS converter.testUnsignedShort is 0x7FFF
+converter.testUnsignedShort = 0xDCBA9876543210
+PASS converter.testUnsignedShort is 0x3210
+converter.testUnsignedShort = Number.MAX_VALUE
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = Number.MIN_VALUE
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -Number.MAX_VALUE
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -Number.MIN_VALUE
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = 1.99
+PASS converter.testUnsignedShort is 1
+converter.testUnsignedShort = -1.99
+PASS converter.testUnsignedShort is 0xFFFF
+converter.testUnsignedShort = Infinity
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = -Infinity
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = NaN
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = false
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = true
+PASS converter.testUnsignedShort is 1
+converter.testUnsignedShort = ''
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = '1'
+PASS converter.testUnsignedShort is 1
+converter.testUnsignedShort = 'abc'
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = null
+PASS converter.testUnsignedShort is 0
+converter.testUnsignedShort = undefined
+PASS converter.testUnsignedShort is 0
+PASS converter.testUnsignedShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
+
+PASS 'testEnforceRangeUnsignedShort' in converter is true
+PASS typeof converter.testEnforceRangeUnsignedShort === 'number' is true
+converter.testEnforceRangeUnsignedShort = 0
+PASS converter.testEnforceRangeUnsignedShort is 0
+converter.testEnforceRangeUnsignedShort = -0
+PASS converter.testEnforceRangeUnsignedShort is 0
+PASS converter.testEnforceRangeUnsignedShort = -1 threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = 1
+PASS converter.testEnforceRangeUnsignedShort is 1
+converter.testEnforceRangeUnsignedShort = 0x7F
+PASS converter.testEnforceRangeUnsignedShort is 0x7F
+converter.testEnforceRangeUnsignedShort = 0x80
+PASS converter.testEnforceRangeUnsignedShort is 0x80
+converter.testEnforceRangeUnsignedShort = 0xFF
+PASS converter.testEnforceRangeUnsignedShort is 0xFF
+PASS converter.testEnforceRangeUnsignedShort = -0x80 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = -0x81 threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = 0x7FFF
+PASS converter.testEnforceRangeUnsignedShort is 0x7FFF
+converter.testEnforceRangeUnsignedShort = 0x8000
+PASS converter.testEnforceRangeUnsignedShort is 0x8000
+converter.testEnforceRangeUnsignedShort = 0xFFFF
+PASS converter.testEnforceRangeUnsignedShort is 0xFFFF
+PASS converter.testEnforceRangeUnsignedShort = 0x10000 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = -0x8000 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = -0x8001 threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = 0x3210
+PASS converter.testEnforceRangeUnsignedShort is 0x3210
+PASS converter.testEnforceRangeUnsignedShort = Number.MAX_VALUE threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = Number.MIN_VALUE
+PASS converter.testEnforceRangeUnsignedShort is 0
+PASS converter.testEnforceRangeUnsignedShort = -Number.MAX_VALUE threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = -Number.MIN_VALUE
+PASS converter.testEnforceRangeUnsignedShort is 0
+converter.testEnforceRangeUnsignedShort = 1.99
+PASS converter.testEnforceRangeUnsignedShort is 1
+PASS converter.testEnforceRangeUnsignedShort = -1.99 threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = Infinity threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = -Infinity threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = NaN threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = false
+PASS converter.testEnforceRangeUnsignedShort is 0
+converter.testEnforceRangeUnsignedShort = true
+PASS converter.testEnforceRangeUnsignedShort is 1
+converter.testEnforceRangeUnsignedShort = ''
+PASS converter.testEnforceRangeUnsignedShort is 0
+converter.testEnforceRangeUnsignedShort = '1'
+PASS converter.testEnforceRangeUnsignedShort is 1
+PASS converter.testEnforceRangeUnsignedShort = 'abc' threw exception TypeError: Type error.
+converter.testEnforceRangeUnsignedShort = null
+PASS converter.testEnforceRangeUnsignedShort is 0
+PASS converter.testEnforceRangeUnsignedShort = undefined threw exception TypeError: Type error.
+PASS converter.testEnforceRangeUnsignedShort = {valueOf:function(){throw new Error('custom');}} threw exception Error: custom.
+
PASS successfullyParsed is true
TEST COMPLETE

Powered by Google App Engine
This is Rietveld 408576698