blob: bca019d5ae19694b4312dd51d25f9c652e895e58 [file] [log] [blame]
This test checks construction of objects with custom constructors.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new Image() is non-null.
PASS new Image().tagName is "IMG"
PASS new Image().height is 0
PASS new Image().width is 0
PASS new Image(0).width is 0
PASS new Image(0, 0).height is 0
PASS new Image(100).width is 100
PASS new Image(100, 200).height is 200
PASS new Image(-100).width is -100
PASS new Image(-100, -200).height is -200
PASS new Image().hasAttribute('height') is false
PASS new Image().hasAttribute('width') is false
PASS new Image(0).hasAttribute('height') is false
PASS new Image(0).hasAttribute('width') is true
PASS new Image(0, 0).hasAttribute('height') is true
PASS new Image(0, 0).hasAttribute('width') is true
PASS new Image().outerHTML is "<img>"
PASS new Image(100, 100).outerHTML.replace(/"/g, "'") is "<img width='100' height='100'>"
PASS new Option() is non-null.
PASS new Option().tagName is "OPTION"
PASS new Option().innerText is ""
PASS new Option(null).innerText is "null"
PASS new Option(undefined).innerText is ""
PASS new Option('somedata').innerText is "somedata"
PASS new Option().value is ""
PASS new Option('somedata', null).value is "null"
PASS new Option('somedata', undefined).value is "somedata"
PASS new Option('somedata', 'somevalue').value is "somevalue"
PASS new Option().defaultSelected is false
PASS new Option('somedata', 'somevalue').defaultSelected is false
PASS new Option('somedata', 'somevalue', false).defaultSelected is false
PASS new Option('somedata', 'somevalue', false, false).defaultSelected is false
PASS new Option('somedata', 'somevalue', true).defaultSelected is true
PASS new Option('somedata', 'somevalue', true, false).defaultSelected is true
PASS new Option('somedata', 'somevalue', true, true).defaultSelected is true
PASS new Option().selected is false
PASS new Option('somedata', 'somevalue').selected is false
PASS new Option('somedata', 'somevalue', false).selected is false
PASS new Option('somedata', 'somevalue', true).selected is false
PASS new Option('somedata', 'somevalue', true, false).selected is false
PASS new Option('somedata', 'somevalue', true, true).selected is true
PASS new Option().outerHTML is "<option></option>"
PASS new Option('somedata', 'somevalue', false).outerHTML.replace(/"/g,"'") is "<option value='somevalue'>somedata</option>"
PASS new Option('somedata', 'somevalue', true).outerHTML.replace(/"/g,"'") is "<option value='somevalue' selected=''>somedata</option>"
PASS new Audio() is non-null.
PASS new Audio().tagName is "AUDIO"
PASS new Audio().src is ""
PASS new Audio().preload is "auto"
PASS new Audio('http://127.0.0.1/someurl').src is "http://127.0.0.1/someurl"
PASS new Audio('http://127.0.0.1/someurl').preload is "auto"
PASS successfullyParsed is true
TEST COMPLETE