67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
Tests that Object.getOwnPropertyDescriptor() works correctly for Window properties
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
* Window.screen
|
|
PASS descriptor.get is an instance of Function
|
|
PASS descriptor.set is an instance of Function
|
|
PASS descriptor.enumerable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The Window.screen getter can only be used on instances of Window.
|
|
PASS descriptor.get.call(window) === window.screen is true
|
|
PASS descriptor.get.call() === window.screen is true
|
|
|
|
* Window.navigator
|
|
PASS descriptor.get is an instance of Function
|
|
PASS descriptor.set is undefined.
|
|
PASS descriptor.enumerable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The Window.navigator getter can only be used on instances of Window.
|
|
PASS descriptor.get.call(window) === window.navigator is true
|
|
PASS descriptor.get.call() === window.navigator is true
|
|
|
|
* Window.self
|
|
PASS descriptor.get is an instance of Function
|
|
PASS descriptor.set is an instance of Function
|
|
PASS descriptor.enumerable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The Window.self getter can only be used on instances of Window.
|
|
PASS descriptor.get.call(window) === window.self is true
|
|
PASS descriptor.get.call() === window.self is true
|
|
|
|
* Window.frameElement
|
|
PASS descriptor.get is an instance of Function
|
|
PASS descriptor.set is undefined.
|
|
PASS descriptor.enumerable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The Window.frameElement getter can only be used on instances of Window.
|
|
PASS descriptor.get.call(window) === window.frameElement is true
|
|
PASS descriptor.get.call() === window.frameElement is true
|
|
|
|
* Window.name
|
|
PASS descriptor.get is an instance of Function
|
|
PASS descriptor.set is an instance of Function
|
|
PASS descriptor.enumerable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The Window.name getter can only be used on instances of Window.
|
|
PASS descriptor.get.call(window) === window.name is true
|
|
PASS descriptor.get.call() === window.name is true
|
|
|
|
* window.Node
|
|
PASS descriptor.enumerable is false
|
|
PASS descriptor.writable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.value is window.Node
|
|
|
|
* window.__proto__.constructor
|
|
PASS descriptor.enumerable is false
|
|
PASS descriptor.writable is true
|
|
PASS descriptor.configurable is true
|
|
PASS descriptor.value is window.Window
|
|
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|