| This tests the constructor for the KeyboardEvent DOM class. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS new KeyboardEvent('eventType').bubbles is false |
| PASS new KeyboardEvent('eventType').cancelable is false |
| PASS new KeyboardEvent('eventType').view is null |
| PASS new KeyboardEvent('eventType').detail is 0 |
| PASS new KeyboardEvent('eventType').keyIdentifier is "" |
| PASS new KeyboardEvent('eventType').location is 0 |
| PASS new KeyboardEvent('eventType').ctrlKey is false |
| PASS new KeyboardEvent('eventType').altKey is false |
| PASS new KeyboardEvent('eventType').shiftKey is false |
| PASS new KeyboardEvent('eventType').metaKey is false |
| PASS new KeyboardEvent('eventType', { bubbles: false }).bubbles is false |
| PASS new KeyboardEvent('eventType', { bubbles: true }).bubbles is true |
| PASS new KeyboardEvent('eventType', { cancelable: false }).cancelable is false |
| PASS new KeyboardEvent('eventType', { cancelable: true }).cancelable is true |
| PASS new KeyboardEvent('eventType', { view: window }).view is window |
| PASS new KeyboardEvent('eventType', { view: this }).view is this |
| PASS new KeyboardEvent('eventType', { }).repeat is false |
| PASS new KeyboardEvent('eventType', { repeat: false }).repeat is false |
| PASS new KeyboardEvent('eventType', { repeat: true }).repeat is true |
| PASS new KeyboardEvent('eventType', { }).isComposing is false |
| PASS new KeyboardEvent('eventType', { isComposing: false }).isComposing is false |
| PASS new KeyboardEvent('eventType', { isComposing: true }).isComposing is true |
| PASS new KeyboardEvent('eventType', { view: testObject }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: document }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: undefined }).view is null |
| PASS new KeyboardEvent('eventType', { view: null }).view is null |
| PASS new KeyboardEvent('eventType', { view: false }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: true }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: '' }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: NaN }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error. |
| PASS new KeyboardEvent('eventType', { get view() { throw 'KeyboardEvent Error'; } }) threw exception KeyboardEvent Error. |
| PASS new KeyboardEvent('eventType', { keyIdentifier: 'koakuma' }).keyIdentifier is "koakuma" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: '' }).keyIdentifier is "" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: undefined }).keyIdentifier is "" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: null }).keyIdentifier is "null" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: false }).keyIdentifier is "false" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: true }).keyIdentifier is "true" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: 12345 }).keyIdentifier is "12345" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: 18446744073709551615 }).keyIdentifier is "18446744073709552000" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: NaN }).keyIdentifier is "NaN" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: [] }).keyIdentifier is "" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: [1, 2, 3] }).keyIdentifier is "1,2,3" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: {koakuma: 12345} }).keyIdentifier is "[object Object]" |
| PASS new KeyboardEvent('eventType', { keyIdentifier: {valueOf: function () { return 'koakuma'; } } }).keyIdentifier is "[object Object]" |
| PASS new KeyboardEvent('eventType', { location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: KeyboardEvent.DOM_KEY_LOCATION_LEFT }).location is KeyboardEvent.DOM_KEY_LOCATION_LEFT |
| PASS new KeyboardEvent('eventType', { location: 4294967294 }).location is 4294967294 |
| PASS new KeyboardEvent('eventType', { location: 4294967295 }).location is 4294967295 |
| PASS new KeyboardEvent('eventType', { location: 9007199254740991 }).location is 4294967295 |
| PASS new KeyboardEvent('eventType', { location: 18446744073709551615 }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: 12345678901234567890 }).location is 3944679424 |
| PASS new KeyboardEvent('eventType', { location: -1 }).location is 4294967295 |
| PASS new KeyboardEvent('eventType', { location: 123.45 }).location is 123 |
| PASS new KeyboardEvent('eventType', { location: NaN }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: undefined }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: null }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: '' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: '12345' }).location is 12345 |
| PASS new KeyboardEvent('eventType', { location: '12345a' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: 'abc' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: [] }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: [12345] }).location is 12345 |
| PASS new KeyboardEvent('eventType', { location: [12345, 67890] }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: {} }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: {moemoe: 12345} }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { location: {valueOf: function () { return 12345; }} }).location is 12345 |
| PASS new KeyboardEvent('eventType', { keyLocation: KeyboardEvent.DOM_KEY_LOCATION_STANDARD }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: KeyboardEvent.DOM_KEY_LOCATION_LEFT }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_LEFT |
| PASS new KeyboardEvent('eventType', { keyLocation: 4294967294 }).keyLocation is 4294967294 |
| PASS new KeyboardEvent('eventType', { keyLocation: 4294967295 }).keyLocation is 4294967295 |
| PASS new KeyboardEvent('eventType', { keyLocation: 9007199254740991 }).keyLocation is 4294967295 |
| PASS new KeyboardEvent('eventType', { keyLocation: 18446744073709551615 }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: 12345678901234567890 }).keyLocation is 3944679424 |
| PASS new KeyboardEvent('eventType', { keyLocation: -1 }).keyLocation is 4294967295 |
| PASS new KeyboardEvent('eventType', { keyLocation: 123.45 }).keyLocation is 123 |
| PASS new KeyboardEvent('eventType', { keyLocation: NaN }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: undefined }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: null }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: '' }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: '12345' }).keyLocation is 12345 |
| PASS new KeyboardEvent('eventType', { keyLocation: '12345a' }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: 'abc' }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: [] }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: [12345] }).keyLocation is 12345 |
| PASS new KeyboardEvent('eventType', { keyLocation: [12345, 67890] }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: {} }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: {moemoe: 12345} }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_STANDARD |
| PASS new KeyboardEvent('eventType', { keyLocation: {valueOf: function () { return 12345; }} }).keyLocation is 12345 |
| PASS new KeyboardEvent('eventType', { keyLocation: KeyboardEvent.DOM_KEY_LOCATION_LEFT }).location is KeyboardEvent.DOM_KEY_LOCATION_LEFT |
| PASS new KeyboardEvent('eventType', { location: KeyboardEvent.DOM_KEY_LOCATION_LEFT }).keyLocation is KeyboardEvent.DOM_KEY_LOCATION_LEFT |
| PASS new KeyboardEvent('eventType', { ctrlKey: false }).ctrlKey is false |
| PASS new KeyboardEvent('eventType', { ctrlKey: true }).ctrlKey is true |
| PASS new KeyboardEvent('eventType', { altKey: false }).altKey is false |
| PASS new KeyboardEvent('eventType', { altKey: true }).altKey is true |
| PASS new KeyboardEvent('eventType', { shiftKey: false }).shiftKey is false |
| PASS new KeyboardEvent('eventType', { shiftKey: true }).shiftKey is true |
| PASS new KeyboardEvent('eventType', { metaKey: false }).metaKey is false |
| PASS new KeyboardEvent('eventType', { metaKey: true }).metaKey is true |
| PASS new KeyboardEvent('eventType', { modifierAltGraph: true }).getModifierState('AltGraph') is true |
| PASS new KeyboardEvent('eventType', { modifierCapsLock: true }).getModifierState('CapsLock') is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).bubbles is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).cancelable is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).view is window |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).detail is 111 |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).key is "a" |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).code is "KeyA" |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).keyIdentifier is "chocolate" |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).location is 222 |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).ctrlKey is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).altKey is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).shiftKey is true |
| PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, key: 'a', code: 'KeyA', keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true }).metaKey is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |