1 CONSOLE WARNING: 'KeyboardEvent.keyLocation' is deprecated. Please use 'KeyboardEvent.location' instead.
2 This tests the constructor for the KeyboardEvent DOM class.
4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 PASS new KeyboardEvent('eventType').bubbles is false
8 PASS new KeyboardEvent('eventType').cancelable is false
9 PASS new KeyboardEvent('eventType').view is null
10 PASS new KeyboardEvent('eventType').detail is 0
11 PASS new KeyboardEvent('eventType').keyIdentifier is ""
12 PASS new KeyboardEvent('eventType').location is 0
13 PASS new KeyboardEvent('eventType').ctrlKey is false
14 PASS new KeyboardEvent('eventType').altKey is false
15 PASS new KeyboardEvent('eventType').shiftKey is false
16 PASS new KeyboardEvent('eventType').metaKey is false
17 PASS new KeyboardEvent('eventType').repeat is false
18 PASS new KeyboardEvent('eventType', { bubbles: false }).bubbles is false
19 PASS new KeyboardEvent('eventType', { bubbles: true }).bubbles is true
20 PASS new KeyboardEvent('eventType', { cancelable: false }).cancelable is false
21 PASS new KeyboardEvent('eventType', { cancelable: true }).cancelable is true
22 PASS new KeyboardEvent('eventType', { view: window }).view is window
23 PASS new KeyboardEvent('eventType', { view: this }).view is this
24 PASS new KeyboardEvent('eventType', { view: testObject }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
25 PASS new KeyboardEvent('eventType', { view: document }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
26 PASS new KeyboardEvent('eventType', { view: undefined }).view is null
27 PASS new KeyboardEvent('eventType', { view: null }).view is null
28 PASS new KeyboardEvent('eventType', { view: false }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
29 PASS new KeyboardEvent('eventType', { view: true }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
30 PASS new KeyboardEvent('eventType', { view: '' }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
31 PASS new KeyboardEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
32 PASS new KeyboardEvent('eventType', { view: 12345 }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
33 PASS new KeyboardEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
34 PASS new KeyboardEvent('eventType', { view: NaN }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
35 PASS new KeyboardEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
36 PASS new KeyboardEvent('eventType', { get view() { return window; } }).view is window
37 PASS new KeyboardEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Failed to construct 'KeyboardEvent': member view is not of type Window..
38 PASS new KeyboardEvent('eventType', { get view() { throw 'KeyboardEvent Error'; } }) threw exception KeyboardEvent Error.
39 PASS new KeyboardEvent('eventType', { keyIdentifier: 'koakuma' }).keyIdentifier is "koakuma"
40 PASS new KeyboardEvent('eventType', { keyIdentifier: '' }).keyIdentifier is ""
41 PASS new KeyboardEvent('eventType', { keyIdentifier: undefined }).keyIdentifier is ""
42 PASS new KeyboardEvent('eventType', { keyIdentifier: null }).keyIdentifier is "null"
43 PASS new KeyboardEvent('eventType', { keyIdentifier: false }).keyIdentifier is "false"
44 PASS new KeyboardEvent('eventType', { keyIdentifier: true }).keyIdentifier is "true"
45 PASS new KeyboardEvent('eventType', { keyIdentifier: 12345 }).keyIdentifier is "12345"
46 PASS new KeyboardEvent('eventType', { keyIdentifier: 18446744073709551615 }).keyIdentifier is "18446744073709552000"
47 PASS new KeyboardEvent('eventType', { keyIdentifier: NaN }).keyIdentifier is "NaN"
48 PASS new KeyboardEvent('eventType', { keyIdentifier: [] }).keyIdentifier is ""
49 PASS new KeyboardEvent('eventType', { keyIdentifier: [1, 2, 3] }).keyIdentifier is "1,2,3"
50 PASS new KeyboardEvent('eventType', { keyIdentifier: {koakuma: 12345} }).keyIdentifier is "[object Object]"
51 PASS new KeyboardEvent('eventType', { keyIdentifier: {valueOf: function () { return 'koakuma'; } } }).keyIdentifier is "[object Object]"
52 PASS new KeyboardEvent('eventType', { location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
53 PASS new KeyboardEvent('eventType', { location: KeyboardEvent.DOM_KEY_LOCATION_LEFT }).location is KeyboardEvent.DOM_KEY_LOCATION_LEFT
54 PASS new KeyboardEvent('eventType', { location: 4294967294 }).location is 4294967294
55 PASS new KeyboardEvent('eventType', { location: 4294967295 }).location is 4294967295
56 PASS new KeyboardEvent('eventType', { keyLocation: 0 }).keyLocation is 0
57 PASS new KeyboardEvent('eventType', { keyLocation: 1 }).keyLocation is 1
58 PASS new KeyboardEvent('eventType', { keyLocation: 1 }).location is 1
59 PASS new KeyboardEvent('eventType', { location: 1 }).keyLocation is 1
60 PASS new KeyboardEvent('eventType', { location: 9007199254740991 }).location is 4294967295
61 PASS new KeyboardEvent('eventType', { location: 18446744073709551615 }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
62 PASS new KeyboardEvent('eventType', { location: 12345678901234567890 }).location is 3944679424
63 PASS new KeyboardEvent('eventType', { location: -1 }).location is 4294967295
64 PASS new KeyboardEvent('eventType', { location: 123.45 }).location is 123
65 PASS new KeyboardEvent('eventType', { location: NaN }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
66 PASS new KeyboardEvent('eventType', { location: undefined }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
67 PASS new KeyboardEvent('eventType', { location: null }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
68 PASS new KeyboardEvent('eventType', { location: '' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
69 PASS new KeyboardEvent('eventType', { location: '12345' }).location is 12345
70 PASS new KeyboardEvent('eventType', { location: '12345a' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
71 PASS new KeyboardEvent('eventType', { location: 'abc' }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
72 PASS new KeyboardEvent('eventType', { location: [] }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
73 PASS new KeyboardEvent('eventType', { location: [12345] }).location is 12345
74 PASS new KeyboardEvent('eventType', { location: [12345, 67890] }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
75 PASS new KeyboardEvent('eventType', { location: {} }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
76 PASS new KeyboardEvent('eventType', { location: {moemoe: 12345} }).location is KeyboardEvent.DOM_KEY_LOCATION_STANDARD
77 PASS new KeyboardEvent('eventType', { location: {valueOf: function () { return 12345; }} }).location is 12345
78 PASS new KeyboardEvent('eventType', { ctrlKey: false }).ctrlKey is false
79 PASS new KeyboardEvent('eventType', { ctrlKey: true }).ctrlKey is true
80 PASS new KeyboardEvent('eventType', { altKey: false }).altKey is false
81 PASS new KeyboardEvent('eventType', { altKey: true }).altKey is true
82 PASS new KeyboardEvent('eventType', { shiftKey: false }).shiftKey is false
83 PASS new KeyboardEvent('eventType', { shiftKey: true }).shiftKey is true
84 PASS new KeyboardEvent('eventType', { metaKey: false }).metaKey is false
85 PASS new KeyboardEvent('eventType', { metaKey: true }).metaKey is true
86 PASS new KeyboardEvent('eventType', { repeat: false }).repeat is false
87 PASS new KeyboardEvent('eventType', { repeat: true }).repeat is true
88 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).bubbles is true
89 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).cancelable is true
90 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).view is window
91 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).detail is 111
92 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).keyIdentifier is "chocolate"
93 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).location is 222
94 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).ctrlKey is true
95 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).altKey is true
96 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).shiftKey is true
97 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).metaKey is true
98 PASS new KeyboardEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, keyIdentifier: 'chocolate', location: 222, ctrlKey: true, altKey: true, shiftKey: true, metaKey: true, repeat: true }).repeat is true
99 PASS successfullyParsed is true