This test checks the behavior of the remove() method on the select.options object.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


1.1 Remove (object) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.2 Remove (string) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.3 Remove (float) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.4 Remove (boolean) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.5 Remove (undefined) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.6 Remove (null) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.7 Remove (negative infinity) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.8 Remove (NaN) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.9 Remove (positive infinity) from empty Options
PASS select1.options.remove(value) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.10 Remove no args from empty Options
PASS select1.options.remove() is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.11 Remove too many args from empty Options
PASS select1.options.remove(0, 'foo') is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.12 Remove invalid index -2 from empty Options
PASS select1.options.remove(-2) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.13 Remove invalid index -1 from empty Options
PASS select1.options.remove(-1) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.14 Remove index 0 from empty Options
PASS select1.options.remove(0) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

1.15 Remove index 1 from empty Options
PASS select1.options.remove(1) is undefined
PASS select1.options.length is 0
PASS select1.selectedIndex is -1

2.1 Remove (object) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 15
PASS select2.selectedIndex is 13
PASS select2.options[0].value is 'B'

2.2 Remove (string) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 14
PASS select2.selectedIndex is 12
PASS select2.options[0].value is 'C'

2.3 Remove (float) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 13
PASS select2.selectedIndex is 11
PASS select2.options[3].value is 'G'

2.4 Remove (boolean true) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 12
PASS select2.selectedIndex is 10
PASS select2.options[1].value is 'E'

2.5 Remove (boolean false) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 11
PASS select2.selectedIndex is 9
PASS select2.options[1].value is 'G'

2.6 Remove (undefined) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 10
PASS select2.selectedIndex is 8
PASS select2.options[0].value is 'G'

2.7 Remove (null) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 9
PASS select2.selectedIndex is 7
PASS select2.options[0].value is 'H'

2.8 Remove (negative infinity) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 8
PASS select2.selectedIndex is 6
PASS select2.options[0].value is 'I'

2.9 Remove (NaN) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 7
PASS select2.selectedIndex is 5
PASS select2.options[0].value is 'J'

2.10 Remove (positive infinity) from non-empty Options
PASS select2.options.remove(value) is undefined
PASS select2.options.length is 6
PASS select2.selectedIndex is 4
PASS select2.options[0].value is 'K'

2.11 Remove no args from non-empty Options
PASS select2.options.remove() is undefined
PASS select2.options.length is 5
PASS select2.selectedIndex is 3
PASS select2.options[0].value is 'L'

2.12 Remove too many args from non-empty Options
PASS select2.options.remove(0, 'foo') is undefined
PASS select2.options.length is 4
PASS select2.selectedIndex is 2
PASS select2.options[0].value is 'M'

2.13 Remove invalid index -2 from non-empty Options
PASS select2.options.remove(-2) is undefined
PASS select2.options.length is 4
PASS select2.selectedIndex is 2
PASS select2.options[2].value is 'O'

2.14 Remove invalid index -1 from non-empty Options
PASS select2.options.remove(-1) is undefined
PASS select2.options.length is 4
PASS select2.selectedIndex is 2
PASS select2.options[3].value is 'P'

2.15 Remove index 0 from non-empty Options
PASS select2.options.remove(0) is undefined
PASS select2.options.length is 3
PASS select2.selectedIndex is 1
PASS select2.options[0].value is 'N'

2.16 Remove index 1 from non-empty Options
PASS select2.options.remove(1) is undefined
PASS select2.options.length is 2
PASS select2.selectedIndex is 0
PASS select2.options[1].value is 'P'

PASS successfullyParsed is true

TEST COMPLETE
 
