blob: 6a1569c37f2d7647ff3c2e4d566b2e5eed647277 [file] [log] [blame]
Tests the indexed setter and getter for HTMLOptionsCollection.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
1) getting options by index or by getElementById
PASS get_options[0] is document.getElementById("one")
PASS get_options[1] is document.getElementById("two")
2) setting a few elements to Option values
PASS set_options.length is 3
3) trying to set an element to a non-Option value: undefined
PASS set_options.length is 3
4) trying to set an element to a non-Option value: null
PASS set_options.length is 3
5) trying to set an element to a non-Option value: form (object of incorrect type)
PASS set_options[10] = my_form threw exception TypeError: Failed to set an indexed property on 'HTMLOptionsCollection': parameter 2 is not of type 'HTMLOptionElement'..
PASS set_options.length is 3
PASS successfullyParsed is true
TEST COMPLETE
========
A
B
option 1
option 2