1 Test select.add() method
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
7 PASS addOption(0) is "X,0,1,2"
8 PASS addOption(1) is "0,X,1,2"
9 PASS addOption(2) is "0,1,X,2"
10 PASS addOption(3) is "0,1,2,X"
11 PASS addOption(100) is "0,1,2,X"
12 PASS addOption(-100) is "0,1,2,X"
13 PASS getSelectOptions() is "0,1,2,X"
14 PASS addOption(undefined) is "0,1,2,X"
15 PASS addOption(null) is "0,1,2,X"
16 PASS addOption(NaN) is "X,0,1,2"
17 PASS addOption(Infinity) is "X,0,1,2"
18 PASS addOption(-Infinity) is "X,0,1,2"
19 PASS addOption("foo") is "X,0,1,2"
20 PASS addOption("0") is "X,0,1,2"
21 PASS addOption("1") is "0,X,1,2"
22 PASS addOption(false) is "X,0,1,2"
23 PASS addOption(true) is "0,X,1,2"
24 PASS addOption(2147483647) is "0,1,2,X"
25 PASS addOption(-2147483647) is "0,1,2,X"
26 PASS addOption(2147483648) is "0,1,2,X"
27 PASS addOption(-2147483648) is "0,1,2,X"
28 PASS select.add() threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': 1 argument required, but only 0 present..
29 PASS select.add("foo") threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
30 PASS select.add("foo", 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
31 PASS select.add(undefined) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
32 PASS select.add(undefined, 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
33 PASS select.add(null) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
34 PASS select.add(null, 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
35 PASS select.add(new Option("X", "X", false, false), 0, 1) is undefined.
36 PASS select.add(new Option("X", "X", false, false), select.options[0], 2) is undefined.
37 PASS getSelectOptions() is "0,X,Y,1,2"
39 PASS addOption(0) is "X,0,1,2"
40 PASS addOption(1) is "0,X,1,2"
41 PASS addOption(2) is "0,1,X,2"
42 PASS addOption(3) is "0,1,2,X"
43 PASS addOption(100) is "0,1,2,X"
44 PASS addOption(-100) is "0,1,2,X"
45 PASS getSelectOptions() is "0,1,2,X"
46 PASS addOption(undefined) is "0,1,2,X"
47 PASS addOption(null) is "0,1,2,X"
48 PASS addOption(NaN) is "X,0,1,2"
49 PASS addOption(Infinity) is "X,0,1,2"
50 PASS addOption(-Infinity) is "X,0,1,2"
51 PASS addOption("foo") is "X,0,1,2"
52 PASS addOption("0") is "X,0,1,2"
53 PASS addOption("1") is "0,X,1,2"
54 PASS addOption(false) is "X,0,1,2"
55 PASS addOption(true) is "0,X,1,2"
56 PASS addOption(2147483647) is "0,1,2,X"
57 PASS addOption(-2147483647) is "0,1,2,X"
58 PASS addOption(2147483648) is "0,1,2,X"
59 PASS addOption(-2147483648) is "0,1,2,X"
60 PASS select.add() threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': 1 argument required, but only 0 present..
61 PASS select.add("foo") threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
62 PASS select.add("foo", 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
63 PASS select.add(undefined) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
64 PASS select.add(undefined, 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
65 PASS select.add(null) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
66 PASS select.add(null, 0) threw exception TypeError: Failed to execute 'add' on 'HTMLSelectElement': The provided value is not of type '(HTMLOptionElement or HTMLOptGroupElement)'.
67 PASS select.add(new Option("X", "X", false, false), 0, 1) is undefined.
68 PASS select.add(new Option("X", "X", false, false), select.options[0], 2) is undefined.
69 PASS getSelectOptions() is "0,X,Y,1,2"
70 PASS successfullyParsed is true