blob: 07b0a9441868f24705b9eda4ea1eb300648fdaeb [file] [log] [blame]
This tests the constructor for the PointerEvent DOM class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
--- tests for intrinsic attributes plus screen & client coordinates ---
-- no init --
PASS new PointerEvent('eventType').pointerId is 0
-- init with valid long values --
PASS new PointerEvent('eventType', { pointerId: 0 }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: 123 }).pointerId is 123
PASS new PointerEvent('eventType', { pointerId: -123 }).pointerId is -123
PASS new PointerEvent('eventType', { pointerId: 2147483647 }).pointerId is 2147483647
PASS new PointerEvent('eventType', { pointerId: -2147483648 }).pointerId is -2147483648
-- init with non-long values --
PASS new PointerEvent('eventType', { pointerId: 18446744073709551615 }).pointerId is 0
PASS new PointerEvent('eventType', {pointerId: 123.45 }).pointerId is 123
PASS new PointerEvent('eventType', { pointerId: '123abc' }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: 'dummy' }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: NaN }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: null }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: undefined }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: [] }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: [12] }).pointerId is 12
PASS new PointerEvent('eventType', { pointerId: [12, 34] }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: {} }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: {abc:1} }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: {} }).pointerId is 0
PASS new PointerEvent('eventType', { pointerId: {valueOf: function () { return 123; }} }).pointerId is 123
-- no init --
PASS new PointerEvent('eventType').tiltX is 0
-- init with valid long values --
PASS new PointerEvent('eventType', { tiltX: 0 }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: 123 }).tiltX is 123
PASS new PointerEvent('eventType', { tiltX: -123 }).tiltX is -123
PASS new PointerEvent('eventType', { tiltX: 2147483647 }).tiltX is 2147483647
PASS new PointerEvent('eventType', { tiltX: -2147483648 }).tiltX is -2147483648
-- init with non-long values --
PASS new PointerEvent('eventType', { tiltX: 18446744073709551615 }).tiltX is 0
PASS new PointerEvent('eventType', {tiltX: 123.45 }).tiltX is 123
PASS new PointerEvent('eventType', { tiltX: '123abc' }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: 'dummy' }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: NaN }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: null }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: undefined }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: [] }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: [12] }).tiltX is 12
PASS new PointerEvent('eventType', { tiltX: [12, 34] }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: {} }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: {abc:1} }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: {} }).tiltX is 0
PASS new PointerEvent('eventType', { tiltX: {valueOf: function () { return 123; }} }).tiltX is 123
-- no init --
PASS new PointerEvent('eventType').tiltY is 0
-- init with valid long values --
PASS new PointerEvent('eventType', { tiltY: 0 }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: 123 }).tiltY is 123
PASS new PointerEvent('eventType', { tiltY: -123 }).tiltY is -123
PASS new PointerEvent('eventType', { tiltY: 2147483647 }).tiltY is 2147483647
PASS new PointerEvent('eventType', { tiltY: -2147483648 }).tiltY is -2147483648
-- init with non-long values --
PASS new PointerEvent('eventType', { tiltY: 18446744073709551615 }).tiltY is 0
PASS new PointerEvent('eventType', {tiltY: 123.45 }).tiltY is 123
PASS new PointerEvent('eventType', { tiltY: '123abc' }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: 'dummy' }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: NaN }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: null }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: undefined }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: [] }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: [12] }).tiltY is 12
PASS new PointerEvent('eventType', { tiltY: [12, 34] }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: {} }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: {abc:1} }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: {} }).tiltY is 0
PASS new PointerEvent('eventType', { tiltY: {valueOf: function () { return 123; }} }).tiltY is 123
-- no init --
PASS new PointerEvent('eventType').twist is 0
-- init with valid long values --
PASS new PointerEvent('eventType', { twist: 0 }).twist is 0
PASS new PointerEvent('eventType', { twist: 123 }).twist is 123
PASS new PointerEvent('eventType', { twist: -123 }).twist is -123
PASS new PointerEvent('eventType', { twist: 2147483647 }).twist is 2147483647
PASS new PointerEvent('eventType', { twist: -2147483648 }).twist is -2147483648
-- init with non-long values --
PASS new PointerEvent('eventType', { twist: 18446744073709551615 }).twist is 0
PASS new PointerEvent('eventType', {twist: 123.45 }).twist is 123
PASS new PointerEvent('eventType', { twist: '123abc' }).twist is 0
PASS new PointerEvent('eventType', { twist: 'dummy' }).twist is 0
PASS new PointerEvent('eventType', { twist: NaN }).twist is 0
PASS new PointerEvent('eventType', { twist: null }).twist is 0
PASS new PointerEvent('eventType', { twist: undefined }).twist is 0
PASS new PointerEvent('eventType', { twist: [] }).twist is 0
PASS new PointerEvent('eventType', { twist: [12] }).twist is 12
PASS new PointerEvent('eventType', { twist: [12, 34] }).twist is 0
PASS new PointerEvent('eventType', { twist: {} }).twist is 0
PASS new PointerEvent('eventType', { twist: {abc:1} }).twist is 0
PASS new PointerEvent('eventType', { twist: {} }).twist is 0
PASS new PointerEvent('eventType', { twist: {valueOf: function () { return 123; }} }).twist is 123
-- no init --
PASS new PointerEvent('eventType').width is 1
-- init with valid float/double values --
PASS new PointerEvent('eventType', { width: 0 }).width is 0
PASS new PointerEvent('eventType', { width: 123 }).width is 123
PASS new PointerEvent('eventType', { width: -123 }).width is -123
PASS new PointerEvent('eventType', { width: 123.45 }).width is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { width: -123.45 }).width is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { width: 1.23e5 }).width is within 0.00001 of 123000
PASS new PointerEvent('eventType', { width: -1.2e-3 }).width is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { width: 16777215 }).width is 16777215
PASS new PointerEvent('eventType', { width: -16777216 }).width is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { width: '123abc' }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: 'dummy' }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: NaN }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: null }).width is 0
PASS new PointerEvent('eventType', { width: undefined }).width is 1
PASS new PointerEvent('eventType', { width: [] }).width is 0
PASS new PointerEvent('eventType', { width: [12] }).width is 12
PASS new PointerEvent('eventType', { width: [12, 34] }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: {} }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: {abc:1} }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: {} }).width threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { width: {valueOf: function () { return 123; }} }).width is 123
-- no init --
PASS new PointerEvent('eventType').height is 1
-- init with valid float/double values --
PASS new PointerEvent('eventType', { height: 0 }).height is 0
PASS new PointerEvent('eventType', { height: 123 }).height is 123
PASS new PointerEvent('eventType', { height: -123 }).height is -123
PASS new PointerEvent('eventType', { height: 123.45 }).height is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { height: -123.45 }).height is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { height: 1.23e5 }).height is within 0.00001 of 123000
PASS new PointerEvent('eventType', { height: -1.2e-3 }).height is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { height: 16777215 }).height is 16777215
PASS new PointerEvent('eventType', { height: -16777216 }).height is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { height: '123abc' }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: 'dummy' }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: NaN }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: null }).height is 0
PASS new PointerEvent('eventType', { height: undefined }).height is 1
PASS new PointerEvent('eventType', { height: [] }).height is 0
PASS new PointerEvent('eventType', { height: [12] }).height is 12
PASS new PointerEvent('eventType', { height: [12, 34] }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: {} }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: {abc:1} }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: {} }).height threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { height: {valueOf: function () { return 123; }} }).height is 123
-- no init --
PASS new PointerEvent('eventType').pressure is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { pressure: 0 }).pressure is 0
PASS new PointerEvent('eventType', { pressure: 123 }).pressure is 123
PASS new PointerEvent('eventType', { pressure: -123 }).pressure is -123
PASS new PointerEvent('eventType', { pressure: 123.45 }).pressure is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { pressure: -123.45 }).pressure is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { pressure: 1.23e5 }).pressure is within 0.00001 of 123000
PASS new PointerEvent('eventType', { pressure: -1.2e-3 }).pressure is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { pressure: 16777215 }).pressure is 16777215
PASS new PointerEvent('eventType', { pressure: -16777216 }).pressure is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { pressure: '123abc' }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: 'dummy' }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: NaN }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: null }).pressure is 0
PASS new PointerEvent('eventType', { pressure: undefined }).pressure is 0
PASS new PointerEvent('eventType', { pressure: [] }).pressure is 0
PASS new PointerEvent('eventType', { pressure: [12] }).pressure is 12
PASS new PointerEvent('eventType', { pressure: [12, 34] }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: {} }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: {abc:1} }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: {} }).pressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { pressure: {valueOf: function () { return 123; }} }).pressure is 123
-- no init --
PASS new PointerEvent('eventType').tangentialPressure is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { tangentialPressure: 0 }).tangentialPressure is 0
PASS new PointerEvent('eventType', { tangentialPressure: 123 }).tangentialPressure is 123
PASS new PointerEvent('eventType', { tangentialPressure: -123 }).tangentialPressure is -123
PASS new PointerEvent('eventType', { tangentialPressure: 123.45 }).tangentialPressure is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { tangentialPressure: -123.45 }).tangentialPressure is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { tangentialPressure: 1.23e5 }).tangentialPressure is within 0.00001 of 123000
PASS new PointerEvent('eventType', { tangentialPressure: -1.2e-3 }).tangentialPressure is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { tangentialPressure: 16777215 }).tangentialPressure is 16777215
PASS new PointerEvent('eventType', { tangentialPressure: -16777216 }).tangentialPressure is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { tangentialPressure: '123abc' }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: 'dummy' }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: NaN }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: null }).tangentialPressure is 0
PASS new PointerEvent('eventType', { tangentialPressure: undefined }).tangentialPressure is 0
PASS new PointerEvent('eventType', { tangentialPressure: [] }).tangentialPressure is 0
PASS new PointerEvent('eventType', { tangentialPressure: [12] }).tangentialPressure is 12
PASS new PointerEvent('eventType', { tangentialPressure: [12, 34] }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: {} }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: {abc:1} }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: {} }).tangentialPressure threw exception TypeError: Failed to construct 'PointerEvent': The provided float value is non-finite..
PASS new PointerEvent('eventType', { tangentialPressure: {valueOf: function () { return 123; }} }).tangentialPressure is 123
-- no init --
PASS new PointerEvent('eventType').screenX is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { screenX: 0 }).screenX is 0
PASS new PointerEvent('eventType', { screenX: 123 }).screenX is 123
PASS new PointerEvent('eventType', { screenX: -123 }).screenX is -123
PASS new PointerEvent('eventType', { screenX: 123.45 }).screenX is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { screenX: -123.45 }).screenX is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { screenX: 1.23e5 }).screenX is within 0.00001 of 123000
PASS new PointerEvent('eventType', { screenX: -1.2e-3 }).screenX is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { screenX: 16777215 }).screenX is 16777215
PASS new PointerEvent('eventType', { screenX: -16777216 }).screenX is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { screenX: '123abc' }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: 'dummy' }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: NaN }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: null }).screenX is 0
PASS new PointerEvent('eventType', { screenX: undefined }).screenX is 0
PASS new PointerEvent('eventType', { screenX: [] }).screenX is 0
PASS new PointerEvent('eventType', { screenX: [12] }).screenX is 12
PASS new PointerEvent('eventType', { screenX: [12, 34] }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: {} }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: {abc:1} }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: {} }).screenX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenX: {valueOf: function () { return 123; }} }).screenX is 123
-- no init --
PASS new PointerEvent('eventType').screenY is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { screenY: 0 }).screenY is 0
PASS new PointerEvent('eventType', { screenY: 123 }).screenY is 123
PASS new PointerEvent('eventType', { screenY: -123 }).screenY is -123
PASS new PointerEvent('eventType', { screenY: 123.45 }).screenY is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { screenY: -123.45 }).screenY is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { screenY: 1.23e5 }).screenY is within 0.00001 of 123000
PASS new PointerEvent('eventType', { screenY: -1.2e-3 }).screenY is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { screenY: 16777215 }).screenY is 16777215
PASS new PointerEvent('eventType', { screenY: -16777216 }).screenY is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { screenY: '123abc' }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: 'dummy' }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: NaN }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: null }).screenY is 0
PASS new PointerEvent('eventType', { screenY: undefined }).screenY is 0
PASS new PointerEvent('eventType', { screenY: [] }).screenY is 0
PASS new PointerEvent('eventType', { screenY: [12] }).screenY is 12
PASS new PointerEvent('eventType', { screenY: [12, 34] }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: {} }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: {abc:1} }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: {} }).screenY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { screenY: {valueOf: function () { return 123; }} }).screenY is 123
-- no init --
PASS new PointerEvent('eventType').clientX is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { clientX: 0 }).clientX is 0
PASS new PointerEvent('eventType', { clientX: 123 }).clientX is 123
PASS new PointerEvent('eventType', { clientX: -123 }).clientX is -123
PASS new PointerEvent('eventType', { clientX: 123.45 }).clientX is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { clientX: -123.45 }).clientX is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { clientX: 1.23e5 }).clientX is within 0.00001 of 123000
PASS new PointerEvent('eventType', { clientX: -1.2e-3 }).clientX is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { clientX: 16777215 }).clientX is 16777215
PASS new PointerEvent('eventType', { clientX: -16777216 }).clientX is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { clientX: '123abc' }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: 'dummy' }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: NaN }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: null }).clientX is 0
PASS new PointerEvent('eventType', { clientX: undefined }).clientX is 0
PASS new PointerEvent('eventType', { clientX: [] }).clientX is 0
PASS new PointerEvent('eventType', { clientX: [12] }).clientX is 12
PASS new PointerEvent('eventType', { clientX: [12, 34] }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: {} }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: {abc:1} }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: {} }).clientX threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientX: {valueOf: function () { return 123; }} }).clientX is 123
-- no init --
PASS new PointerEvent('eventType').clientY is 0
-- init with valid float/double values --
PASS new PointerEvent('eventType', { clientY: 0 }).clientY is 0
PASS new PointerEvent('eventType', { clientY: 123 }).clientY is 123
PASS new PointerEvent('eventType', { clientY: -123 }).clientY is -123
PASS new PointerEvent('eventType', { clientY: 123.45 }).clientY is within 0.00001 of 123.45
PASS new PointerEvent('eventType', { clientY: -123.45 }).clientY is within 0.00001 of -123.45
PASS new PointerEvent('eventType', { clientY: 1.23e5 }).clientY is within 0.00001 of 123000
PASS new PointerEvent('eventType', { clientY: -1.2e-3 }).clientY is within 0.00001 of -0.0012
PASS new PointerEvent('eventType', { clientY: 16777215 }).clientY is 16777215
PASS new PointerEvent('eventType', { clientY: -16777216 }).clientY is -16777216
-- init with non-float/double values --
PASS new PointerEvent('eventType', { clientY: '123abc' }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: 'dummy' }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: NaN }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: null }).clientY is 0
PASS new PointerEvent('eventType', { clientY: undefined }).clientY is 0
PASS new PointerEvent('eventType', { clientY: [] }).clientY is 0
PASS new PointerEvent('eventType', { clientY: [12] }).clientY is 12
PASS new PointerEvent('eventType', { clientY: [12, 34] }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: {} }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: {abc:1} }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: {} }).clientY threw exception TypeError: Failed to construct 'PointerEvent': The provided double value is non-finite..
PASS new PointerEvent('eventType', { clientY: {valueOf: function () { return 123; }} }).clientY is 123
--- tests for inherited attributes (other than screen & client coordinates) ---
PASS new PointerEvent('eventType').bubbles is false
PASS new PointerEvent('eventType').cancelable is false
PASS new PointerEvent('eventType').view is null
PASS new PointerEvent('eventType').detail is 0
PASS new PointerEvent('eventType').ctrlKey is false
PASS new PointerEvent('eventType').shiftKey is false
PASS new PointerEvent('eventType').altKey is false
PASS new PointerEvent('eventType').metaKey is false
PASS new PointerEvent('eventType').button is 0
PASS new PointerEvent('eventType').buttons is 0
PASS new PointerEvent('eventType').relatedTarget is null
--- tests for coalesced events ---
PASS pe.getCoalescedEvents().length is 2
PASS pe.pressure is within 0.00001 of 0.1
PASS pe.getCoalescedEvents()[0].pressure is within 0.00001 of 1
PASS pe.getCoalescedEvents()[1].pressure is within 0.00001 of 0.5
PASS pe.pointerId is 1
PASS pe.getCoalescedEvents()[0].pointerId is 2
PASS pe.getCoalescedEvents()[1].pointerId is 2
PASS successfullyParsed is true
TEST COMPLETE