blob: f96c8faf55731dc556414b02a2a6b98c331ca88f [file] [log] [blame]
Test that DOMRect has a serializer
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS rect.__proto__ is DOMRect.prototype
PASS toJSONDescriptor.value is an instance of Function
PASS toJSONDescriptor.enumerable is true
PASS toJSONDescriptor.configurable is true
PASS toJSONDescriptor.writable is true
PASS jsonObject = rect.toJSON() did not throw exception.
PASS jsonObject.top is rect.top
PASS jsonObject.right is rect.right
PASS jsonObject.bottom is rect.bottom
PASS jsonObject.left is rect.left
PASS jsonObject.width is rect.width
PASS jsonObject.height is rect.height
PASS parsedJSONObject = JSON.parse(JSON.stringify(rect)) did not throw exception.
PASS parsedJSONObject.top is rect.top
PASS parsedJSONObject.right is rect.right
PASS parsedJSONObject.bottom is rect.bottom
PASS parsedJSONObject.left is rect.left
PASS parsedJSONObject.width is rect.width
PASS parsedJSONObject.height is rect.height
PASS successfullyParsed is true
TEST COMPLETE