• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Test that label.control references the correct form control, or null if there is no associated control.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6Find a control that is the first descendent in a label
7PASS document.getElementById('test1').control.id is 'inputId1'
8Find a control based on a label with valid 'for' attribute
9PASS document.getElementById('test2').htmlFor is 'inputId2'
10PASS document.getElementById('test2').control.type is 'number'
11Find a control in p element in label
12PASS document.getElementById('test3').control.id is 'inputId3'
13Find a control in fieldset in label.
14Note that filedset is a form control that is not labelable.
15PASS document.getElementById('test4').control.id is 'inputId4'
16Find a control in legend in label.
17Note that legend is a form control that is not labelable.
18PASS document.getElementById('test5').control.id is 'inputId5'
19Find a control in optgroup in label.
20Note that optgroup is a form control that is not labelable.
21PASS document.getElementById('test6').control.id is 'inputId6'
22Find a control in option in label.
23Note that option is a form control that is not labelable.
24PASS document.getElementById('test7').control.id is 'inputId7'
25Test label with 'for' attribute which is not a valid element id
26PASS document.getElementById('test8').control is null
27Test label with 'for' attribute which is not a form control
28PASS document.getElementById('test9').htmlFor is 'divId'
29PASS document.getElementById('test9').control is null
30Test label with 'for' attribute which is not a labelable form control - fieldset
31PASS document.getElementById('test10').htmlFor is 'fsId'
32PASS document.getElementById('test10').control is null
33Test label with 'for' attribute which is not a labelable form control - legend
34PASS document.getElementById('test11').htmlFor is 'legendId'
35PASS document.getElementById('test11').control is null
36Test label with 'for' attribute which is not a labelable form control - optgroup
37PASS document.getElementById('test12').htmlFor is 'optgroupId'
38PASS document.getElementById('test12').control is null
39Test label with 'for' attribute which is not a labelable form control - option
40PASS document.getElementById('test13').htmlFor is 'optionId'
41PASS document.getElementById('test13').control is null
42PASS successfullyParsed is true
43
44TEST COMPLETE
45
46
47
48
49
50
51
52