summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/dom-level2-html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/tests/mochitest/dom-level2-html')
-rw-r--r--dom/tests/mochitest/dom-level2-html/DOMTestCase.js718
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor.xhtml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor.xml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor2.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor2.xhtml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/anchor2.xml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet2.class14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet2.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet2.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applet2.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/applets/org/w3c/domts/DOMTSApplet.classbin0 -> 1584 bytes
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area2.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area2.xhtml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/area2.xml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base.html11
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base.xhtml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base.xml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base2.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base2.xhtml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/base2.xml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/body.html10
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/body.xhtml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/body.xml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/br.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/br.xhtml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/br.xml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/button.html21
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/button.xhtml24
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/button.xml24
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/collection.html79
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/collection.xhtml82
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/collection.xml82
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/directory.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/directory.xhtml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/directory.xml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/div.html10
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/div.xhtml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/div.xml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/dl.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/dl.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/dl.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/document-with-applet.html36
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/document.html34
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/document.xhtml39
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/document.xml39
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/element.html81
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/element.xhtml83
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/element.xml83
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/fieldset.html23
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/fieldset.xhtml25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/fieldset.xml25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/font.html10
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/font.xhtml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/font.xml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form.html17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form2.html17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form2.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form2.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form3.html17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form3.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/form3.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame2.html16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame2.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frame2.xml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frameset.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frameset.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/frameset.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/heading.html16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/heading.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/heading.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/hr.html11
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/hr.xhtml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/hr.xml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/html.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/html.xhtml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/html.xml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe.html10
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe.xhtml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe.xml12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe2.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe2.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/iframe2.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/img.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/img.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/img.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/index.html216
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/input.html60
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/input.xhtml62
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/input.xml62
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/isindex.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/isindex.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/isindex.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/label.html21
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/label.xhtml22
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/label.xml22
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/legend.html22
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/legend.xhtml23
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/legend.xml23
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/li.html23
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/li.xhtml25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/li.xml25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link2.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link2.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/link2.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/map.html16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/map.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/map.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/menu.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/menu.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/menu.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/meta.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/meta.xhtml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/meta.xml16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/mod.html15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/mod.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/mod.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object.html18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object.xhtml20
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object.xml20
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object2.html17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object2.xhtml20
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/object2.xml20
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/olist.html32
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/olist.xhtml34
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/olist.xml34
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optgroup.html25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optgroup.xhtml27
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optgroup.xml27
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/option.html36
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/option.xhtml33
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/option.xml33
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optionscollection.html36
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optionscollection.xhtml33
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/optionscollection.xml33
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/paragraph.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/paragraph.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/paragraph.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/param.html14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/param.xhtml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/param.xml17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/pre.html17
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/pre.xhtml19
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/pre.xml19
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/quote.html16
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/quote.xhtml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/quote.xml18
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/right.pngbin0 -> 137 bytes
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/script.html11
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/script.xhtml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/script.xml13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/select.html44
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/select.xhtml41
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/select.xml41
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/style.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/style.xhtml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/style.xml14
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table.html78
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table.xhtml81
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table.xml81
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table1.html12
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table1.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/table1.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecaption.html25
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecaption.xhtml21
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecaption.xml21
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecell.html23
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecell.xhtml26
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecell.xml26
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecol.html35
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecol.xhtml29
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablecol.xml29
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablerow.html59
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablerow.xhtml62
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablerow.xml62
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablesection.html62
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablesection.xhtml65
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/tablesection.xml65
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/textarea.html26
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/textarea.xhtml27
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/textarea.xml27
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/title.html13
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/title.xhtml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/title.xml15
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/ulist.html36
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/ulist.xhtml38
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/ulist.xml38
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/w3c_main.pngbin0 -> 5904 bytes
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml-lat1.ent196
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml-special.ent80
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml-symbol.ent237
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml1-frameset.dtd1235
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml1-strict.dtd978
-rw-r--r--dom/tests/mochitest/dom-level2-html/files/xhtml1-transitional.dtd1201
-rw-r--r--dom/tests/mochitest/dom-level2-html/mochitest.ini863
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement09.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement10.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement11.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement12.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement13.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement14.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement07.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBRElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement02.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement06.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement01.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement06.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection01.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection02.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection03.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection04.html158
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection05.html142
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection06.html148
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection07.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection08.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection09.html142
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection10.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection11.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLCollection12.html149
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDirectoryElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDivElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDlistElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument01.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument02.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument03.html134
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument04.html132
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument10.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument11.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument12.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument13.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument14.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument15.html142
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument16.html142
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument17.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument18.html123
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument19.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument20.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLDocument21.html162
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement09.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement10.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement100.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement101.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement102.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement103.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement104.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement105.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement106.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement107.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement108.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement109.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement11.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement110.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement111.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement112.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement113.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement114.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement115.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement116.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement117.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement118.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement119.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement12.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement120.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement121.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement122.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement123.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement124.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement125.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement126.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement127.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement128.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement129.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement13.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement130.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement131.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement132.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement133.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement134.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement135.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement136.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement137.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement138.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement139.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement14.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement140.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement141.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement142.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement143.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement144.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement145.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement15.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement16.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement17.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement18.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement19.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement20.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement21.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement22.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement23.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement24.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement25.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement26.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement27.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement28.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement29.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement30.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement31.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement32.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement33.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement34.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement35.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement36.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement37.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement38.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement39.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement40.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement41.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement42.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement43.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement44.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement45.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement46.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement47.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement48.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement49.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement50.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement51.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement52.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement53.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement54.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement55.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement56.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement57.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement58.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement59.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement60.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement61.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement62.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement63.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement64.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement65.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement66.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement67.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement68.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement69.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement70.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement71.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement72.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement73.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement74.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement75.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement76.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement77.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement78.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement79.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement80.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement81.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement82.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement83.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement84.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement85.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement86.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement87.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement88.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement89.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement90.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement91.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement92.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement93.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement94.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement95.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement96.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement97.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement98.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLElement99.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement01.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFontElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFontElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFontElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement01.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement09.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFormElement10.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement01.html141
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement05.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement09.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHRElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHRElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHRElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHRElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLHtmlElement01.html149
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement02.html141
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement06.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement08.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement10.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement11.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement06.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement09.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement10.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement11.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLImageElement12.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement03.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement05.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement08.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement12.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement13.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement14.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement15.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement16.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement17.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement18.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement19.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement20.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement21.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLInputElement22.html127
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLIElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLIElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement01.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement01.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement06.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement07.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement08.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement09.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMapElement01.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMapElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMenuElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLModElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLModElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLModElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLModElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOListElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOListElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOListElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement01.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement09.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement12.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement13.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement14.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement15.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement16.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement17.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement18.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement19.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement20.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement01.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement05.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement08.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection01.html144
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection02.html157
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection03.html158
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection04.html158
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection05.html160
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection06.html153
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection07.html157
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLParagraphElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLParamElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLParamElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLParamElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLParamElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLPreElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement04.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement05.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement06.html128
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement07.html128
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement03.html146
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement06.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement08.html158
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement09.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement12.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement13.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement14.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement15.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement16.html134
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement17.html134
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement18.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement19.html156
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement20.html153
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement03.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCaptionElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement02.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement03.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement04.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement05.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement08.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement09.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement12.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement13.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement14.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement15.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement16.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement17.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement18.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement19.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement20.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement21.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement22.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement23.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement24.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement25.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement26.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement27.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement28.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement29.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement30.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement06.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement08.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement09.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement11.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement12.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement01.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement03.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement05.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement07.html156
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement08.html153
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement09.html157
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement11.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement12.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement13.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement14.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement15.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement16.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement17.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement18.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement19.html149
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement20.html148
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement21.html164
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement22.html149
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement23.html148
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement24.html164
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement25.html145
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement26.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement27.html141
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement28.html159
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement29.html163
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement30.html171
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement31.html169
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement32.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement33.html148
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement34.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement35.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement36.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement37.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement38.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement39.html177
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableElement40.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement01.html143
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement05.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement07.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement11.html173
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement12.html171
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement13.html172
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement14.html172
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement15.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement16.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement17.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement18.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement19.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement20.html177
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement21.html176
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement02.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement05.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement07.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement12.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement13.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement14.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement15.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement16.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement17.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement18.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement19.html153
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement20.html153
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement21.html155
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement22.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement23.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement24.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement25.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement26.html151
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement27.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement28.html152
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement29.html150
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement30.html159
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement31.html156
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement01.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement02.html140
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement03.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement04.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement05.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement06.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement08.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement09.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement10.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement11.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement12.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement13.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement14.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement15.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLTitleElement01.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLUListElement01.html137
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_HTMLUListElement02.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_alltests.html3933
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor01.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor02.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor03.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor04.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor05.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_anchor06.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_area01.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_area02.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_area03.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_area04.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_body01.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button01.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button02.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button03.html138
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button04.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button05.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button06.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button07.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button08.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_button09.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_dlist01.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_doc01.html126
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature01.html113
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature02.html112
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature03.html115
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature04.html114
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature05.html113
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_hasFeature06.html112
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object01.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object02.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object03.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object04.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object05.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object06.html134
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object07.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object08.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object09.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object10.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object11.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object12.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object13.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object14.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_object15.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table01.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table02.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table03.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table04.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table06.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table07.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table08.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table09.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table10.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table12.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table15.html139
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table17.html136
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table18.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table19.html135
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table20.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table21.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table22.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table23.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table24.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table25.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table26.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table27.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table28.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table29.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table30.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table31.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table32.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table33.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table34.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table35.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table36.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table37.html131
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table38.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table39.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table40.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table41.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table42.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table43.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table44.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table45.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table46.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table47.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table48.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table49.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table50.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table51.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table52.html133
-rw-r--r--dom/tests/mochitest/dom-level2-html/test_table53.html133
863 files changed, 104332 insertions, 0 deletions
diff --git a/dom/tests/mochitest/dom-level2-html/DOMTestCase.js b/dom/tests/mochitest/dom-level2-html/DOMTestCase.js
new file mode 100644
index 0000000000..3747e3962c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/DOMTestCase.js
@@ -0,0 +1,718 @@
+/*
+Copyright (c) 2001-2005 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National de
+Recherche en Informatique et en Automatique, Keio University). All
+Rights Reserved. This program is distributed under the W3C's Software
+Intellectual Property License. This program is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+*/
+
+function assertNull(descr, actual) {
+ return ok(actual === null, descr);
+}
+
+
+function assertNotNull(descr, actual) {
+ return ok(actual !== null, descr);
+}
+
+function assertTrue(descr, actual) {
+ return ok(actual === true, descr);
+}
+
+function assertFalse(descr, actual) {
+ return ok(actual === false, descr);
+}
+
+function assertEquals(descr, expected, actual) {
+ return is(actual, expected, descr);
+}
+
+ function assertSize(descr, expected, actual) {
+ ok(actual !== null, descr);
+/*
+ // Work around too strict checks.
+ if (!actual) {
+ ok(actual, "[assertSize()] 'actual' has a value");
+ return;
+ }
+*/
+
+ is(actual.length, expected, descr);
+ }
+
+ function assertEqualsAutoCase(context, descr, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if(context == "attribute") {
+ is(actual.toLowerCase(), expected.toLowerCase(), descr);
+ } else {
+ is(actual, expected.toUpperCase(), descr);
+ }
+ } else {
+ is(actual, expected, descr);
+ }
+ }
+
+
+ function assertEqualsCollectionAutoCase(context, descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ is(actual.length, expected.length, descr);
+
+ //
+ // if there length is the same, then every entry in the expected list
+ // must appear once and only once in the actual list
+ var expectedLen = expected.length;
+ var expectedValue;
+ var actualLen = actual.length;
+ var i;
+ var j;
+ var matches;
+ for(i = 0; i < expectedLen; i++) {
+ matches = 0;
+ expectedValue = expected[i];
+ for(j = 0; j < actualLen; j++) {
+ if (builder.contentType == "text/html") {
+ if (context == "attribute") {
+ if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
+ matches++;
+ }
+ } else {
+ if (expectedValue.toUpperCase() == actual[j]) {
+ matches++;
+ }
+ }
+ } else {
+ if(expectedValue == actual[j]) {
+ matches++;
+ }
+ }
+ }
+ if(matches == 0) {
+ ok(false, descr + ": No match found for " + expectedValue);
+ }
+ if(matches > 1) {
+ ok(false, descr + ": Multiple matches found for " + expectedValue);
+ }
+ }
+ }
+
+ function assertEqualsCollection(descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ is(actual.length, expected.length, descr);
+ //
+ // if there length is the same, then every entry in the expected list
+ // must appear once and only once in the actual list
+ var expectedLen = expected.length;
+ var expectedValue;
+ var actualLen = actual.length;
+ var i;
+ var j;
+ var matches;
+ for(i = 0; i < expectedLen; i++) {
+ matches = 0;
+ expectedValue = expected[i];
+ for(j = 0; j < actualLen; j++) {
+ if(expectedValue == actual[j]) {
+ matches++;
+ }
+ }
+ if(matches == 0) {
+ ok(false, descr + ": No match found for " + expectedValue);
+ }
+ if(matches > 1) {
+ ok(false, descr + ": Multiple matches found for " + expectedValue);
+ }
+ }
+ }
+
+
+ function assertEqualsListAutoCase(context, descr, expected, actual) {
+ var minLength = expected.length;
+ if (actual.length < minLength) {
+ minLength = actual.length;
+ }
+ //
+ for(var i = 0; i < minLength; i++) {
+ assertEqualsAutoCase(context, descr, expected[i], actual[i]);
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ is(actual.length, expected.length, descr);
+ }
+
+
+ function assertEqualsList(descr, expected, actual) {
+ var minLength = expected.length;
+ if (actual.length < minLength) {
+ minLength = actual.length;
+ }
+ //
+ for(var i = 0; i < minLength; i++) {
+ if(expected[i] != actual[i]) {
+ is(actual[i], expected[i], descr);
+ }
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ is(actual.length, expected.length, descr);
+ }
+
+ function assertInstanceOf(descr, type, obj) {
+ if(type == "Attr") {
+ is(2, obj.nodeType, descr);
+ var specd = obj.specified;
+ }
+/*
+ else {
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ todo_is(type, "Attr", "[DOMTestCase.assertInstanceOf()] Fake default check.");
+ }
+*/
+ }
+
+ function assertSame(descr, expected, actual) {
+ if(expected != actual) {
+ is(expected.nodeType, actual.nodeType, descr);
+ is(expected.nodeValue, actual.nodeValue, descr);
+ }
+/*
+ else {
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ todo_isnot(expected, actual, "[DOMTestCase.assertSame()] Fake default check." +
+ " (Type=" + actual.nodeType + ", Value=" + actual.nodeValue + ")");
+ }
+*/
+ }
+
+ function assertURIEquals(assertID, scheme, path, host, file, name, query, fragment, isAbsolute, actual) {
+ //
+ // URI must be non-null
+ ok(assertID, "[assertURIEquals()] 'assertID' has a value");
+ ok(actual, "[assertURIEquals()] 'actual' has a value");
+/*
+ // Add missing early return.
+ if (!actual)
+ return;
+*/
+
+ var uri = actual;
+
+ var lastPound = actual.lastIndexOf("#");
+ var actualFragment = "";
+ if(lastPound != -1) {
+ //
+ // substring before pound
+ //
+ uri = actual.substring(0,lastPound);
+ actualFragment = actual.substring(lastPound+1);
+ }
+ if(fragment != null) is(actualFragment, fragment, assertID);
+
+ var lastQuestion = uri.lastIndexOf("?");
+ var actualQuery = "";
+ if(lastQuestion != -1) {
+ //
+ // substring before pound
+ //
+ uri = actual.substring(0,lastQuestion);
+ actualQuery = actual.substring(lastQuestion+1);
+ }
+ if(query != null) is(actualQuery, query, assertID);
+
+ var firstColon = uri.indexOf(":");
+ var firstSlash = uri.indexOf("/");
+ var actualPath = uri;
+ var actualScheme = "";
+ if(firstColon != -1 && firstColon < firstSlash) {
+ actualScheme = uri.substring(0,firstColon);
+ actualPath = uri.substring(firstColon + 1);
+ }
+
+ if(scheme != null) {
+ is(scheme, actualScheme, assertID);
+ }
+
+ if(path != null) {
+ is(path, actualPath, assertID);
+ }
+
+ if(host != null) {
+ var actualHost = "";
+ if(actualPath.substring(0,2) == "//") {
+ var termSlash = actualPath.substring(2).indexOf("/") + 2;
+ actualHost = actualPath.substring(0,termSlash);
+ }
+ is(actualHost, host, assertID);
+ }
+
+ if(file != null || name != null) {
+ var actualFile = actualPath;
+ var finalSlash = actualPath.lastIndexOf("/");
+ if(finalSlash != -1) {
+ actualFile = actualPath.substring(finalSlash+1);
+ }
+ if (file != null) {
+ is(actualFile, file, assertID);
+ }
+ if (name != null) {
+ var actualName = actualFile;
+ var finalDot = actualFile.lastIndexOf(".");
+ if (finalDot != -1) {
+ actualName = actualName.substring(0, finalDot);
+ }
+ is(actualName, name, assertID);
+ }
+ }
+
+ if(isAbsolute != null) {
+ is(actualPath.substring(0,1) == "/", isAbsolute, assertID);
+ }
+ }
+
+
+// size() used by assertSize element
+function size(collection)
+{
+ return collection.length;
+}
+
+function same(expected, actual)
+{
+ return expected === actual;
+}
+
+function getSuffix(contentType) {
+ switch(contentType) {
+ case "text/html":
+ return ".html";
+
+ case "text/xml":
+ return ".xml";
+
+ case "application/xhtml+xml":
+ return ".xhtml";
+
+ case "image/svg+xml":
+ return ".svg";
+
+ case "text/mathml":
+ return ".mml";
+ }
+ return ".html";
+}
+
+function equalsAutoCase(context, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if (context == "attribute") {
+ return expected.toLowerCase() == actual;
+ }
+ return expected.toUpperCase() == actual;
+ }
+ return expected == actual;
+}
+
+function catchInitializationError(blder, ex) {
+ if (blder == null) {
+ alert(ex);
+ } else {
+ blder.initializationError = ex;
+ blder.initializationFatalError = ex;
+ }
+}
+
+function checkInitialization(blder, testname) {
+ if (blder.initializationError != null) {
+ // Fake a "warn()" function, as it was missing :-|
+ function warn(msg) {
+ info("[checkInitialization() warning] " + msg);
+ }
+
+ if (blder.skipIncompatibleTests) {
+ warn(testname + " not run:" + blder.initializationError);
+ return blder.initializationError;
+ } else {
+ //
+ // if an exception was thrown
+ // rethrow it and do not run the test
+ if (blder.initializationFatalError != null) {
+ throw blder.initializationFatalError;
+ } else {
+ //
+ // might be recoverable, warn but continue the test
+ warn(testname + ": " + blder.initializationError);
+ }
+ }
+ }
+ return null;
+}
+function createTempURI(scheme) {
+ if (scheme == "http") {
+ return "http://localhost:8080/webdav/tmp" + Math.floor(Math.random() * 100000) + ".xml";
+ }
+ return "file:///tmp/domts" + Math.floor(Math.random() * 100000) + ".xml";
+}
+
+
+function EventMonitor() {
+ this.atEvents = new Array();
+ this.bubbledEvents = new Array();
+ this.capturedEvents = new Array();
+ this.allEvents = new Array();
+}
+
+EventMonitor.prototype.handleEvent = function(evt) {
+ switch(evt.eventPhase) {
+ case 1:
+ monitor.capturedEvents[monitor.capturedEvents.length] = evt;
+ break;
+
+ case 2:
+ monitor.atEvents[monitor.atEvents.length] = evt;
+ break;
+
+ case 3:
+ monitor.bubbledEvents[monitor.bubbledEvents.length] = evt;
+ break;
+ }
+ monitor.allEvents[monitor.allEvents.length] = evt;
+}
+
+function DOMErrorImpl(err) {
+ this.severity = err.severity;
+ this.message = err.message;
+ this.type = err.type;
+ this.relatedException = err.relatedException;
+ this.relatedData = err.relatedData;
+ this.location = err.location;
+}
+
+
+
+function DOMErrorMonitor() {
+ this.allErrors = new Array();
+}
+
+DOMErrorMonitor.prototype.handleError = function(err) {
+ errorMonitor.allErrors[errorMonitor.allErrors.length] = new DOMErrorImpl(err);
+}
+
+DOMErrorMonitor.prototype.assertLowerSeverity = function(id, severity) {
+ var i;
+ for (i = 0; i < errorMonitor.allErrors.length; i++) {
+ if (errorMonitor.allErrors[i].severity >= severity) {
+ assertEquals(id, severity - 1, errorMonitor.allErrors[i].severity);
+ }
+ }
+}
+
+function UserDataNotification(operation, key, data, src, dst) {
+ this.operation = operation;
+ this.key = key;
+ this.data = data;
+ this.src = src;
+ this.dst = dst;
+}
+
+function UserDataMonitor() {
+ this.allNotifications = new Array();
+}
+
+UserDataMonitor.prototype.handle = function(operation, key, data, src, dst) {
+ userDataMonitor.allNotifications[this.allNotifications.length] =
+ new UserDataNotification(operation, key, data, src, dst);
+}
+
+
+
+function IFrameBuilder() {
+ this.contentType = "text/html";
+ this.supportedContentTypes = [ "text/html",
+ "text/xml",
+ "image/svg+xml",
+ "application/xhtml+xml" ];
+
+ this.supportsAsyncChange = false;
+ this.async = true;
+ this.fixedAttributeNames = [
+ "validating", "expandEntityReferences", "coalescing",
+ "signed", "hasNullString", "ignoringElementContentWhitespace", "namespaceAware", "ignoringComments", "schemaValidating"];
+
+ this.fixedAttributeValues = [false, true, false, true, true , false, false, true, false ];
+ this.configurableAttributeNames = [ ];
+ this.configurableAttributeValues = [ ];
+ this.initializationError = null;
+ this.initializationFatalError = null;
+ this.skipIncompatibleTests = false;
+}
+
+IFrameBuilder.prototype.hasFeature = function(feature, version) {
+ return document.implementation.hasFeature(feature, version);
+}
+
+IFrameBuilder.prototype.getImplementation = function() {
+ return document.implementation;
+}
+
+IFrameBuilder.prototype.setContentType = function(contentType) {
+ this.contentType = contentType;
+ if (contentType == "text/html") {
+ this.fixedAttributeValues[6] = false;
+ } else {
+ this.fixedAttributeValues[6] = true;
+ }
+}
+
+
+
+IFrameBuilder.prototype.preload = function(frame, varname, url) {
+ var suffix;
+ if (this.contentType == "text/html" ||
+ this.contentType == "application/xhtml+xml") {
+ if (url.substring(0,5) == "staff" || url == "nodtdstaff" ||
+ url == "datatype_normalization") {
+ suffix = ".xml";
+ }
+ }
+
+ if (!suffix) suffix = getSuffix(this.contentType);
+
+ var iframe = document.createElement("iframe");
+ var srcname = url + suffix;
+ iframe.setAttribute("name", srcname);
+ iframe.setAttribute("src", fileBase + srcname);
+ //
+ // HTML and XHTML have onload attributes that will invoke loadComplete
+ //
+ if (suffix.indexOf("html") < 0) {
+ iframe.addEventListener("load", loadComplete, false);
+ }
+ document.getElementsByTagName("body").item(0).appendChild(iframe);
+ return 0;
+}
+
+IFrameBuilder.prototype.load = function(frame, varname, url) {
+ var suffix;
+ if (url.substring(0,5) == "staff" || url == "nodtdstaff" || url == "datatype_normalization") {
+ suffix = ".xml";
+ }
+ if (!suffix) suffix = getSuffix(this.contentType);
+ var name = url + suffix;
+ var iframes = document.getElementsByTagName("iframe");
+ for(var i = 0; i < iframes.length; i++) {
+ if (iframes.item(i).getAttribute("name") == name) {
+ var item = iframes.item(i);
+ if (typeof(item.contentDocument) != 'undefined') {
+ return item.contentDocument;
+ }
+ if (typeof(item.document) != 'undefined') {
+ return item.document;
+ }
+ return null;
+ }
+ }
+ return null;
+}
+
+IFrameBuilder.prototype.getImplementationAttribute = function(attr) {
+ for (var i = 0; i < this.fixedAttributeNames.length; i++) {
+ if (this.fixedAttributeNames[i] == attr) {
+ return this.fixedAttributeValues[i];
+ }
+ }
+ throw "Unrecognized implementation attribute: " + attr;
+}
+
+
+
+IFrameBuilder.prototype.setImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ if (supported != value) {
+ this.initializationError = "IFrame loader does not support " + attribute + "=" + value;
+ }
+}
+
+
+IFrameBuilder.prototype.canSetImplementationAttribute = function(attribute, value) {
+ var supported = this.getImplementationAttribute(attribute);
+ return (supported == value);
+}
+
+
+function createBuilder(implementation) {
+ if (implementation == null) {
+ return new IFrameBuilder();
+ }
+ switch(implementation) {
+/* case "msxml3":
+ return new MSXMLBuilder("Msxml2.DOMDocument.3.0");
+
+ case "msxml4":
+ return new MSXMLBuilder("Msxml2.DOMDocument.4.0");*/
+
+ case "mozillaXML":
+ return new MozillaXMLBuilder();
+/*
+ case "svgplugin":
+ return new SVGPluginBuilder();
+
+ case "dom3ls":
+ return new DOM3LSBuilder(); */
+
+ case "iframe":
+ return new IFrameBuilder();
+
+ case "xmlhttprequest":
+ return new XMLHttpRequestBuilder();
+
+ default:
+ alert ("unrecognized implementation " + implementation);
+ }
+ return new IFrameBuilder();
+}
+
+function checkFeature(feature, version)
+{
+ if (!builder.hasFeature(feature, version))
+ {
+ //
+ // don't throw exception so that users can select to ignore the precondition
+ //
+ builder.initializationError = "builder does not support feature " + feature + " version " + version;
+ }
+}
+
+function createConfiguredBuilder() {
+ var builder = null;
+ var contentType = null;
+ var i;
+ var contentTypeSet = false;
+ var parm = null;
+ builder = new IFrameBuilder();
+ return builder;
+}
+
+
+function preload(frame, varname, url) {
+ return builder.preload(frame, varname, url);
+}
+
+function load(frame, varname, url) {
+ return builder.load(frame, varname, url);
+}
+
+function getImplementationAttribute(attr) {
+ return builder.getImplementationAttribute(attr);
+}
+
+
+function setImplementationAttribute(attribute, value) {
+ builder.setImplementationAttribute(attribute, value);
+}
+
+function setAsynchronous(value) {
+ if (builder.supportsAsyncChange) {
+ builder.async = value;
+ } else {
+ update();
+ }
+}
+
+
+function createXPathEvaluator(doc) {
+ try {
+ return doc.getFeature("XPath", null);
+ }
+ catch(ex) {
+ }
+ return doc;
+}
+
+function toLowerArray(src) {
+ var newArray = new Array();
+ var i;
+ for (i = 0; i < src.length; i++) {
+ newArray[i] = src[i].toLowerCase();
+ }
+ return newArray;
+}
+
+function MSXMLBuilder_onreadystatechange() {
+ if (builder.parser.readyState == 4) {
+ loadComplete();
+ }
+}
+
+
+
+var fileBase = location.href;
+if (fileBase.indexOf('?') != -1) {
+ fileBase = fileBase.substring(0, fileBase.indexOf('?'));
+}
+fileBase = fileBase.substring(0, fileBase.lastIndexOf('/') + 1) + "files/";
+
+function getResourceURI(name, scheme, contentType) {
+ return fileBase + name + getSuffix(contentType);
+}
+
+
+function getImplementation() {
+ return builder.getImplementation();
+}
+
+/*
+// Count of failures overridden as todos.
+var gFailuresAsTodos = 0;
+
+// Override SimpleTest result logger.
+var ST_logResult = SimpleTest._logResult;
+SimpleTest._logResult = function overrideSTlR(test, passString, failString) {
+ if (todoTests[docName] && !test.result && !test.todo) {
+ test.name = "[failure as todo] " + test.name;
+ test.todo = true;
+ failString = "TEST-KNOWN-FAIL";
+
+ ++gFailuresAsTodos;
+ }
+
+ ST_logResult(test, passString, failString);
+}
+*/
+
+window.doc = window;
+SimpleTest.waitForExplicitFinish();
+addLoadEvent(function(){ setUpPage(); });
+
+/*
+// Actual marking code is in overrideSTlR() now.
+function markTodos() {
+ if (todoTests[docName]) {
+ isnot(gFailuresAsTodos, 0, "test marked todo should have failed somewhere");
+ }
+}
+*/
+
+function runJSUnitTests() {
+ builder = createConfiguredBuilder();
+ try {
+ var tests = exposeTestFunctionNames();
+ for (var i = 0; i < tests.length; i++) {
+ window[tests[i]]();
+ }
+ } catch (ex) {
+/*
+ if (todoTests[docName]) {
+ todo(false, "[failure as todo] Test threw exception: " + ex);
+ ++gFailuresAsTodos;
+ } else {
+*/
+ ok(false, "Test threw exception: " + ex);
+/*
+ }
+*/
+ }
+}
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor.html b/dom/tests/mochitest/dom-level2-html/files/anchor.html
new file mode 100644
index 0000000000..952e8d9288
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Anchor</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<A ID="Anchor" DIR="LTR" HREF="./pix/submit.gif" ACCESSKEY="g" TYPE="image/gif" COORDS="0,0,100,100" SHAPE="rect" REL="GLOSSARY" REV="STYLESHEET" HREFLANG="en" CHARSET="US-ASCII" TABINDEX="22" NAME="Anchor">View Submit Button</A>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor.xhtml b/dom/tests/mochitest/dom-level2-html/files/anchor.xhtml
new file mode 100644
index 0000000000..1be5755330
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Anchor</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor.xml b/dom/tests/mochitest/dom-level2-html/files/anchor.xml
new file mode 100644
index 0000000000..1be5755330
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Anchor</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor2.html b/dom/tests/mochitest/dom-level2-html/files/anchor2.html
new file mode 100644
index 0000000000..1b04fb9ff1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Anchor</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<A HREF="./pix/submit.gif" TARGET="dynamic">View Submit Button</A>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor2.xhtml b/dom/tests/mochitest/dom-level2-html/files/anchor2.xhtml
new file mode 100644
index 0000000000..096eb60148
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor2.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Anchor</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<a href="./pix/submit.gif" target="dynamic">View Submit Button</a>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/anchor2.xml b/dom/tests/mochitest/dom-level2-html/files/anchor2.xml
new file mode 100644
index 0000000000..096eb60148
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/anchor2.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Anchor</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<a href="./pix/submit.gif" target="dynamic">View Submit Button</a>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet.html b/dom/tests/mochitest/dom-level2-html/files/applet.html
new file mode 100644
index 0000000000..d721cf1d9d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Applet</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" CODE="org/w3c/domts/DOMTSApplet.class" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet.xhtml b/dom/tests/mochitest/dom-level2-html/files/applet.xhtml
new file mode 100644
index 0000000000..cf2070cf28
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet.xml b/dom/tests/mochitest/dom-level2-html/files/applet.xml
new file mode 100644
index 0000000000..cf2070cf28
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" code="org/w3c/domts/DOMTSApplet.class" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet2.class b/dom/tests/mochitest/dom-level2-html/files/applet2.class
new file mode 100644
index 0000000000..3faee91d31
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet2.class
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>300 Multiple Choices</title>
+</head><body>
+<h1>Multiple Choices</h1>
+The document name you requested (<code>/2004/04/ecmascript/level2/html/files/applet2.class</code>) could not be found on this server.
+However, we found documents with names similar to the one you requested.<p>Available documents:
+<ul>
+<li><a href="/2004/04/ecmascript/level2/html/files/applet2.xml">/2004/04/ecmascript/level2/html/files/applet2.xml</a> (common basename)
+<li><a href="/2004/04/ecmascript/level2/html/files/applet2.html">/2004/04/ecmascript/level2/html/files/applet2.html</a> (common basename)
+<li><a href="/2004/04/ecmascript/level2/html/files/applet2.xhtml">/2004/04/ecmascript/level2/html/files/applet2.xhtml</a> (common basename)
+</ul>
+Please consider informing the owner of the <a href="http://www.w3.org/2004/04/ecmascript/level2/html/files/document.html">referring page</a> about the broken link.
+</body></html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet2.html b/dom/tests/mochitest/dom-level2-html/files/applet2.html
new file mode 100644
index 0000000000..0379ed1267
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet2.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Applet</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" OBJECT="DOMTSApplet.dat" CODEBASE="applets" HEIGHT="306" HSPACE="0" NAME="applet1" VSPACE="0" WIDTH="301"></APPLET>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet2.xhtml b/dom/tests/mochitest/dom-level2-html/files/applet2.xhtml
new file mode 100644
index 0000000000..43b27daeff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet2.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/applet2.xml b/dom/tests/mochitest/dom-level2-html/files/applet2.xml
new file mode 100644
index 0000000000..43b27daeff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applet2.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Applet</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<applet align="bottom" alt="Applet Number 1" archive="" object="DOMTSApplet.dat" codebase="applets" height="306" hspace="0" name="applet1" vspace="0" width="301"></applet>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/applets/org/w3c/domts/DOMTSApplet.class b/dom/tests/mochitest/dom-level2-html/files/applets/org/w3c/domts/DOMTSApplet.class
new file mode 100644
index 0000000000..17933091f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/applets/org/w3c/domts/DOMTSApplet.class
Binary files differ
diff --git a/dom/tests/mochitest/dom-level2-html/files/area.html b/dom/tests/mochitest/dom-level2-html/files/area.html
new file mode 100644
index 0000000000..dddff68493
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Area</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain">
+</MAP>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/area.xhtml b/dom/tests/mochitest/dom-level2-html/files/area.xhtml
new file mode 100644
index 0000000000..1e497f36c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain"/>
+</map>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/area.xml b/dom/tests/mochitest/dom-level2-html/files/area.xml
new file mode 100644
index 0000000000..1e497f36c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain"/>
+</map>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/area2.html b/dom/tests/mochitest/dom-level2-html/files/area2.html
new file mode 100644
index 0000000000..f1ae08161d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Area</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA HREF="./files/dletter.html" ALT="Domain" TARGET="dynamic">
+</MAP>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/area2.xhtml b/dom/tests/mochitest/dom-level2-html/files/area2.xhtml
new file mode 100644
index 0000000000..5476bee9ef
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area2.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter.html" alt="Domain" target="dynamic"/>
+</map>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/area2.xml b/dom/tests/mochitest/dom-level2-html/files/area2.xml
new file mode 100644
index 0000000000..5476bee9ef
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/area2.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Area</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter.html" alt="Domain" target="dynamic"/>
+</map>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base.html b/dom/tests/mochitest/dom-level2-html/files/base.html
new file mode 100644
index 0000000000..53d151d8b1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<BASE HREF="about:blank">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Base</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>Some Text</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base.xhtml b/dom/tests/mochitest/dom-level2-html/files/base.xhtml
new file mode 100644
index 0000000000..bc41a1d029
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="about:blank"/>
+<title>NIST DOM HTML Test - Base</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Some Text</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base.xml b/dom/tests/mochitest/dom-level2-html/files/base.xml
new file mode 100644
index 0000000000..bc41a1d029
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="about:blank"/>
+<title>NIST DOM HTML Test - Base</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Some Text</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base2.html b/dom/tests/mochitest/dom-level2-html/files/base2.html
new file mode 100644
index 0000000000..514d534fc7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
+"http://www.w3.org/TR/html4/frameset.dtd">
+<HTML>
+<HEAD>
+<BASE HREF="about:blank" TARGET="Frame1">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Base2</TITLE>
+</HEAD>
+<FRAMESET COLS="20, 80" onload="parent.loadComplete()">
+<FRAMESET ROWS="100, 200">
+<FRAME MARGINHEIGHT="10" MARGINWIDTH="5" NORESIZE="NORESIZE" NAME="Frame1" FRAMEBORDER="1" SCROLLING="yes" SRC="right.png">
+</FRAMESET>
+<FRAME SRC="w3c_main.png">
+</FRAMESET>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base2.xhtml b/dom/tests/mochitest/dom-level2-html/files/base2.xhtml
new file mode 100644
index 0000000000..3d15b902f6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base2.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="about:blank" target="Frame1"/>
+<title>NIST DOM HTML Test - Base2</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame marginheight="10" marginwidth="5" noresize="noresize" name="Frame1" frameborder="1" scrolling="yes" src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/base2.xml b/dom/tests/mochitest/dom-level2-html/files/base2.xml
new file mode 100644
index 0000000000..3d15b902f6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/base2.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="about:blank" target="Frame1"/>
+<title>NIST DOM HTML Test - Base2</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame marginheight="10" marginwidth="5" noresize="noresize" name="Frame1" frameborder="1" scrolling="yes" src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/body.html b/dom/tests/mochitest/dom-level2-html/files/body.html
new file mode 100644
index 0000000000..6468cd0180
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/body.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Body</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()" ALINK="#0000ff" BACKGROUND="./pix/back1.gif" BGCOLOR="#ffff00" LINK="#ff0000" TEXT="#000000" VLINK="#00ffff">
+<P>Hello, World</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/body.xhtml b/dom/tests/mochitest/dom-level2-html/files/body.xhtml
new file mode 100644
index 0000000000..fa6d1b795c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/body.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="http://xw2k.sdct.itl.nist.gov/brady/dom/"/>
+<title>NIST DOM HTML Test - Body</title>
+</head>
+<body onload="parent.loadComplete()" alink="#0000ff" background="./pix/back1.gif" bgcolor="#ffff00" link="#ff0000" text="#000000" vlink="#00ffff">
+<p>Hello, World.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/body.xml b/dom/tests/mochitest/dom-level2-html/files/body.xml
new file mode 100644
index 0000000000..fa6d1b795c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/body.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<base href="http://xw2k.sdct.itl.nist.gov/brady/dom/"/>
+<title>NIST DOM HTML Test - Body</title>
+</head>
+<body onload="parent.loadComplete()" alink="#0000ff" background="./pix/back1.gif" bgcolor="#ffff00" link="#ff0000" text="#000000" vlink="#00ffff">
+<p>Hello, World.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/br.html b/dom/tests/mochitest/dom-level2-html/files/br.html
new file mode 100644
index 0000000000..0a3a3d4e20
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/br.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - BR</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<BR CLEAR="none">
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/br.xhtml b/dom/tests/mochitest/dom-level2-html/files/br.xhtml
new file mode 100644
index 0000000000..99c9c1ef8c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/br.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br clear="none"/>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/br.xml b/dom/tests/mochitest/dom-level2-html/files/br.xml
new file mode 100644
index 0000000000..99c9c1ef8c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/br.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br clear="none"/>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/button.html b/dom/tests/mochitest/dom-level2-html/files/button.html
new file mode 100644
index 0000000000..c891ba4a5f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/button.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Button</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form2" ACTION="..." METHOD="POST">
+<P>
+ <BUTTON ACCESSKEY="f" NAME="disabledButton" TABINDEX="20" TYPE="reset" VALUE="Reset Disabled Button" DISABLED="disabled">Reset</BUTTON>
+</P>
+</FORM>
+<TABLE SUMMARY="Extra Button Table">
+<TR>
+<TD>
+<BUTTON>Extra Button</BUTTON>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/button.xhtml b/dom/tests/mochitest/dom-level2-html/files/button.xhtml
new file mode 100644
index 0000000000..3136988242
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/button.xhtml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Button</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form2" action="..." method="post">
+<p>
+ <button accesskey="f" name="disabledButton" tabindex="20" type="reset" value="Reset Disabled Button" disabled="disabled">Reset</button>
+</p>
+</form>
+<table summary="Extra Button Table">
+<tr>
+<td>
+<button>Extra Button</button>
+</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/button.xml b/dom/tests/mochitest/dom-level2-html/files/button.xml
new file mode 100644
index 0000000000..3136988242
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/button.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Button</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form2" action="..." method="post">
+<p>
+ <button accesskey="f" name="disabledButton" tabindex="20" type="reset" value="Reset Disabled Button" disabled="disabled">Reset</button>
+</p>
+</form>
+<table summary="Extra Button Table">
+<tr>
+<td>
+<button>Extra Button</button>
+</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/collection.html b/dom/tests/mochitest/dom-level2-html/files/collection.html
new file mode 100644
index 0000000000..885202df4e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/collection.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - SELECT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE ID="table-1" BORDER="4" FRAME="border" CELLPADDING="2" CELLSPACING="2" SUMMARY="HTML Control Table" RULES="all">
+<CAPTION>Table Caption</CAPTION>
+<THEAD ALIGN="center" VALIGN="middle">
+<TR ALIGN="center" VALIGN="middle" CHAR="*" CHAROFF="1">
+<TH ID="header-1">Employee Id</TH>
+<TH ID="header-2" ABBR="maiden" AXIS="center" ALIGN="center" COLSPAN="1" ROWSPAN="1" SCOPE="col" HEADERS="header-1" VALIGN="middle">Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+<TH>Gender</TH>
+<TH>Address</TH>
+</TR>
+</THEAD>
+<TFOOT ALIGN="center" VALIGN="middle">
+<TR>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+</TR>
+</TFOOT>
+<TBODY ALIGN="center" VALIGN="middle">
+<TR>
+<TD AXIS="center" ID="Table-3" ABBR="maiden2" COLSPAN="1" ROWSPAN="1" SCOPE="col" HEADERS="header-2" VALIGN="middle">EMP0001</TD>
+<TD HEADERS="header-2">Margaret Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+<TD>Female</TD>
+<TD>1230 North Ave. Dallas, Texas 98551</TD>
+</TR>
+<TR>
+<TD>EMP0002</TD>
+<TD>Martha Raynolds</TD>
+<TD>Secretary</TD>
+<TD>35,000</TD>
+<TD>Female</TD>
+<TD>1900 Dallas Road Dallas, Texas 98554</TD>
+</TR>
+</TBODY>
+</TABLE>
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<SELECT ID="selectId" DIR="ltr" TABINDEX="7" NAME="select1" MULTIPLE="multiple" SIZE="1">
+<OPTION SELECTED="selected" value="EMP1">EMP10001</OPTION>
+<OPTION>EMP10002</OPTION>
+<OPTION>EMP10003</OPTION>
+<OPTION>EMP10004</OPTION>
+<OPTION>EMP10005</OPTION>
+</SELECT>
+</P>
+</FORM>
+<P>
+<SELECT NAME="select2">
+<OPTION>EMP20001</OPTION>
+<OPTION>EMP20002</OPTION>
+<OPTION>EMP20003</OPTION>
+<OPTION>EMP20004</OPTION>
+<OPTION>EMP20005</OPTION>
+</SELECT>
+</P>
+<P>
+<SELECT NAME="select3" DISABLED="disabled" TABINDEX="1">
+<OPTION>EMP30001</OPTION>
+<OPTION>EMP30002</OPTION>
+<OPTION>EMP30003</OPTION>
+<OPTION>EMP30004</OPTION>
+<OPTION>EMP30005</OPTION>
+</SELECT>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/collection.xhtml b/dom/tests/mochitest/dom-level2-html/files/collection.xhtml
new file mode 100644
index 0000000000..9da52c1ec5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/collection.xhtml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<table id="table-1" border="4" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all">
+<caption>Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" colspan="1" rowspan="1" scope="col" headers="header-1" valign="middle">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" colspan="1" rowspan="1" scope="col" headers="header-2" valign="middle">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="EMP1">EMP10001</option>
+<option>EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option>EMP20005</option>
+</select>
+</p>
+<p>
+<select name="select3" disabled="disabled" tabindex="1">
+<option>EMP30001</option>
+<option>EMP30002</option>
+<option>EMP30003</option>
+<option>EMP30004</option>
+<option>EMP30005</option>
+</select>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/collection.xml b/dom/tests/mochitest/dom-level2-html/files/collection.xml
new file mode 100644
index 0000000000..9da52c1ec5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/collection.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<table id="table-1" border="4" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all">
+<caption>Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" colspan="1" rowspan="1" scope="col" headers="header-1" valign="middle">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" colspan="1" rowspan="1" scope="col" headers="header-2" valign="middle">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="EMP1">EMP10001</option>
+<option>EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option>EMP20005</option>
+</select>
+</p>
+<p>
+<select name="select3" disabled="disabled" tabindex="1">
+<option>EMP30001</option>
+<option>EMP30002</option>
+<option>EMP30003</option>
+<option>EMP30004</option>
+<option>EMP30005</option>
+</select>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/directory.html b/dom/tests/mochitest/dom-level2-html/files/directory.html
new file mode 100644
index 0000000000..0e2f460916
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/directory.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Directory</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<DIR COMPACT="compact">
+<LI>DIR item number 1.</LI>
+<LI>DIR item number 2.</LI>
+<LI>DIR item number 3.</LI>
+</DIR>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/directory.xhtml b/dom/tests/mochitest/dom-level2-html/files/directory.xhtml
new file mode 100644
index 0000000000..bf70ef8453
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/directory.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Directory</title>
+</head>
+<body onload="parent.loadComplete()">
+<dir compact="compact">
+<li>DIR item number 1.</li>
+<li>DIR item number 2.</li>
+<li>DIR item number 3.</li>
+</dir>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/directory.xml b/dom/tests/mochitest/dom-level2-html/files/directory.xml
new file mode 100644
index 0000000000..bf70ef8453
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/directory.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Directory</title>
+</head>
+<body onload="parent.loadComplete()">
+<dir compact="compact">
+<li>DIR item number 1.</li>
+<li>DIR item number 2.</li>
+<li>DIR item number 3.</li>
+</dir>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/div.html b/dom/tests/mochitest/dom-level2-html/files/div.html
new file mode 100644
index 0000000000..6b83646216
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/div.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - DIV</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<DIV ALIGN="center">The DIV element is a generic block container. This text should be centered.</DIV>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/div.xhtml b/dom/tests/mochitest/dom-level2-html/files/div.xhtml
new file mode 100644
index 0000000000..7a1059a38e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/div.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DIV</title>
+</head>
+<body onload="parent.loadComplete()">
+<div align="center">The DIV element is a generic block container. This text should be centered.</div>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/div.xml b/dom/tests/mochitest/dom-level2-html/files/div.xml
new file mode 100644
index 0000000000..7a1059a38e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/div.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DIV</title>
+</head>
+<body onload="parent.loadComplete()">
+<div align="center">The DIV element is a generic block container. This text should be centered.</div>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/dl.html b/dom/tests/mochitest/dom-level2-html/files/dl.html
new file mode 100644
index 0000000000..5dec3affe3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/dl.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - DL</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<DL COMPACT="COMPACT">
+<DD>Accountant</DD>
+<DD>56,000</DD>
+<DD>Female</DD>
+<DD>1230 North Ave. Dallas, Texas 98551</DD>
+</DL>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/dl.xhtml b/dom/tests/mochitest/dom-level2-html/files/dl.xhtml
new file mode 100644
index 0000000000..72c6475d40
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/dl.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DL</title>
+</head>
+<body onload="parent.loadComplete()">
+<dl compact="compact">
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+<dd>1230 North Ave. Dallas, Texas 98551</dd>
+</dl>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/dl.xml b/dom/tests/mochitest/dom-level2-html/files/dl.xml
new file mode 100644
index 0000000000..72c6475d40
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/dl.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DL</title>
+</head>
+<body onload="parent.loadComplete()">
+<dl compact="compact">
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+<dd>1230 North Ave. Dallas, Texas 98551</dd>
+</dl>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/document-with-applet.html b/dom/tests/mochitest/dom-level2-html/files/document-with-applet.html
new file mode 100644
index 0000000000..4e6025b2d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/document-with-applet.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - DOCUMENT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()" ID="TEST-BODY">
+<FORM ID="form1" ACCEPT-CHARSET="US-ASCII" ACTION="./files/getData.pl" ENCTYPE="application/x-www-form-urlencoded" METHOD="post">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7"></TEXTAREA>
+<INPUT TYPE="submit" NAME="submit" VALUE="Submit" />
+<INPUT TYPE="reset" NAME="reset" VALUE="Reset" />
+</P>
+</FORM>
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain1">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain2">
+</MAP>
+</P>
+<P>
+<IMG ID="IMAGE-1" NAME="IMAGE-1" SRC="./pix/dts.gif" ALT="DTS IMAGE LOGO" LONGDESC="./files/desc.html" USEMAP="#DTS-MAP" WIDTH="115"/>
+</P>
+<P>
+<OBJECT DATA="./pix/line.gif" CODETYPE="image/gif" HEIGHT="10">
+<APPLET ALIGN="bottom" ALT="Applet Number 1" ARCHIVE="" CODE="org/w3c/domts/DOMTSApplet.class" CODEBASE="applets"></APPLET>
+</OBJECT>
+<OBJECT DATA="./pix/logo.gif" type="image/gif">
+<APPLET ALT="Applet Number 2" CODE="org/w3c/domts/DOMTSApplet.class" CODEBASE="applets"></APPLET>
+</OBJECT>
+</P>
+<P>
+<A ID="Anchor" DIR="LTR" HREF="./pix/submit.gif" ACCESSKEY="g" TYPE="image/gif" COORDS="0,0,100,100" SHAPE="rect" REL="GLOSSARY" REV="STYLESHEET" HREFLANG="en" CHARSET="US-ASCII" TABINDEX="22" NAME="Anchor">View Submit Button</A>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/document.html b/dom/tests/mochitest/dom-level2-html/files/document.html
new file mode 100644
index 0000000000..530b92f189
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/document.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - DOCUMENT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()" ID="TEST-BODY">
+<FORM ID="form1" ACCEPT-CHARSET="US-ASCII" ACTION="./files/getData.pl" ENCTYPE="application/x-www-form-urlencoded" METHOD="post">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7"></TEXTAREA>
+<INPUT TYPE="submit" NAME="submit" VALUE="Submit" />
+<INPUT TYPE="reset" NAME="reset" VALUE="Reset" />
+</P>
+</FORM>
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain1">
+<AREA TABINDEX="10" ACCESSKEY="a" SHAPE="rect" ALT="Domain" COORDS="0,2,45,45" HREF="./files/dletter.html" TITLE="Domain2">
+</MAP>
+</P>
+<P>
+<IMG ID="IMAGE-1" NAME="IMAGE-1" SRC="./pix/dts.gif" ALT="DTS IMAGE LOGO" LONGDESC="./files/desc.html" USEMAP="#DTS-MAP" WIDTH="115"/>
+</P>
+<P>
+<OBJECT DATA="./pix/line.gif" CODETYPE="image/gif" HEIGHT="10">
+</OBJECT>
+<OBJECT DATA="./pix/logo.gif" type="image/gif">
+</OBJECT>
+</P>
+<P>
+<A ID="Anchor" DIR="LTR" HREF="./pix/submit.gif" ACCESSKEY="g" TYPE="image/gif" COORDS="0,0,100,100" SHAPE="rect" REL="GLOSSARY" REV="STYLESHEET" HREFLANG="en" CHARSET="US-ASCII" TABINDEX="22" NAME="Anchor">View Submit Button</A>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/document.xhtml b/dom/tests/mochitest/dom-level2-html/files/document.xhtml
new file mode 100644
index 0000000000..3cc6ccf10f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/document.xhtml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DOCUMENT</title>
+</head>
+<body onload="parent.loadComplete()" id="TEST-BODY">
+<form id="form1" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea name="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain1" />
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain2" />
+</map>
+</p>
+<p>
+<img id="IMAGE-1" src="./pix/dts.gif" alt="DTS IMAGE LOGO" longdesc="./files/desc.html" usemap="#DTS-MAP" width="115"/>
+</p>
+<p>
+<object data="./pix/line.gif" codetype="image/gif" height="10">
+<applet alt="Applet Number 1" code="applet1.class" width="10" height="10"></applet>
+</object>
+<object data="./pix/logo.gif" type="image/gif">
+<applet alt="Applet Number 2" code="applet2.class" width="10" height="10"></applet>
+</object>
+</p>
+<p>
+<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/document.xml b/dom/tests/mochitest/dom-level2-html/files/document.xml
new file mode 100644
index 0000000000..3cc6ccf10f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/document.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - DOCUMENT</title>
+</head>
+<body onload="parent.loadComplete()" id="TEST-BODY">
+<form id="form1" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea name="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+<p>
+<map name="mapid" id="mapid">
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain1" />
+<area tabindex="10" accesskey="a" shape="rect" alt="Domain" coords="0,2,45,45" href="./files/dletter.html" title="Domain2" />
+</map>
+</p>
+<p>
+<img id="IMAGE-1" src="./pix/dts.gif" alt="DTS IMAGE LOGO" longdesc="./files/desc.html" usemap="#DTS-MAP" width="115"/>
+</p>
+<p>
+<object data="./pix/line.gif" codetype="image/gif" height="10">
+<applet alt="Applet Number 1" code="applet1.class" width="10" height="10"></applet>
+</object>
+<object data="./pix/logo.gif" type="image/gif">
+<applet alt="Applet Number 2" code="applet2.class" width="10" height="10"></applet>
+</object>
+</p>
+<p>
+<a id="Anchor" dir="ltr" href="./pix/submit.gif" accesskey="g" type="image/gif" coords="0,0,100,100" shape="rect" rel="GLOSSARY" rev="STYLESHEET" hreflang="en" charset="US-ASCII" tabindex="22" name="Anchor">View Submit Button</a>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/element.html b/dom/tests/mochitest/dom-level2-html/files/element.html
new file mode 100644
index 0000000000..a0c198e815
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/element.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD ID="Test-HEAD" TITLE="HEAD Element" LANG="en" DIR="ltr" CLASS="HEAD-class">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Element</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<CENTER ID="Test-CENTER" TITLE="CENTER Element" LANG="en" DIR="ltr" CLASS="CENTER-class">
+<OBJECT align="middle"></OBJECT>
+</CENTER>
+<CENTER>
+<P align="center">Test Lists</P>
+</CENTER>
+<BR>
+<OL compact="compact" start="1" type="1">
+ <LI type="square" value=2>EMP0001
+ <UL compact type="disc">
+ <LI>Margaret Martin
+ <DL>
+ <DD ID="Test-DD" TITLE="DD Element" LANG="en" DIR="ltr" CLASS="DD-class">Accountant</DD>
+ <DD>56,000</DD>
+ <DD>Female</DD>
+ <DD>1230 North Ave. Dallas, Texas 98551</DD>
+ </DL>
+ </LI>
+ </UL>
+ </LI>
+</OL>
+<BR />
+<B ID="Test-B" TITLE="B Element" LANG="en" DIR="ltr" CLASS="B-class">Bold</B>
+<BR />
+<DL>
+ <DT ID="Test-DT" TITLE="DT Element" LANG="en" DIR="ltr" CLASS="DT-class">DT element</DT>
+</DL>
+<BR />
+<BDO ID="Test-BDO" TITLE="BDO Element" LANG="en" DIR="ltr" CLASS="BDO-class">Bidirectional algorithm overide
+</BDO>
+<BR />
+<I ID="Test-I" TITLE="I Element" LANG="en" DIR="ltr" CLASS="I-class">Italicized</I>
+<BR />
+<SPAN ID="Test-SPAN" TITLE="SPAN Element" LANG="en" DIR="ltr" CLASS="SPAN-class"></SPAN>
+<BR />
+<TT ID="Test-TT" TITLE="TT Element" LANG="en" DIR="ltr" CLASS="TT-class">Teletype</TT>
+<BR />
+<SUB ID="Test-SUB" TITLE="SUB Element" LANG="en" DIR="ltr" CLASS="SUB-class">Subscript</SUB>
+<BR />
+<SUP ID="Test-SUP" TITLE="SUP Element" LANG="en" DIR="ltr" CLASS="SUP-class">SuperScript</SUP>
+<BR />
+<S ID="Test-S" TITLE="S Element" LANG="en" DIR="ltr" CLASS="S-class">Strike Through (S)</S>
+<BR />
+<STRIKE ID="Test-STRIKE" TITLE="STRIKE Element" LANG="en" DIR="ltr" CLASS="STRIKE-class">Strike Through (STRIKE)</STRIKE>
+<BR />
+<SMALL id="Test-SMALL" TITLE="SMALL Element" LANG="en" DIR="ltr" CLASS="SMALL-class">Small</SMALL>
+<BR />
+<BIG ID="Test-BIG" TITLE="BIG Element" LANG="en" DIR="ltr" CLASS="BIG-class">Big</BIG>
+<BR />
+<EM ID="Test-EM" TITLE="EM Element" LANG="en" DIR="ltr" CLASS="EM-class">Emphasis</EM>
+<BR />
+<STRONG ID="Test-STRONG" TITLE="STRONG Element" LANG="en" DIR="ltr" CLASS="STRONG-class">Strong</STRONG>
+<BR />
+<DFN ID="Test-DFN" TITLE="DFN Element" LANG="en" DIR="ltr" CLASS="DFN-class">
+ <CODE ID="Test-CODE" TITLE="CODE Element" LANG="en" DIR="ltr" CLASS="CODE-class">10 Computer Code Fragment 20 Temp = 10</CODE>
+ <SAMP ID="Test-SAMP" TITLE="SAMP Element" LANG="en" DIR="ltr" CLASS="SAMP-class">Temp = 20</SAMP>
+ <KBD ID="Test-KBD" TITLE="KBD Element" LANG="en" DIR="ltr" CLASS="KBD-class">*2</KBD>
+ <VAR ID="Test-VAR" TITLE="VAR Element" LANG="en" DIR="ltr" CLASS="VAR-class">Temp</VAR>
+ <CITE ID="Test-CITE" TITLE="CITE Element" LANG="en" DIR="ltr" CLASS="CITE-class">Citation</CITE>
+</DFN>
+<BR />
+<ABBR ID="Test-ABBR" TITLE="ABBR Element" LANG="en" DIR="ltr" CLASS="ABBR-class">Temp</ABBR>
+<BR />
+<ACRONYM ID="Test-ACRONYM" TITLE="ACRONYM Element" LANG="en" DIR="ltr" CLASS="ACRONYM-class">NIST</ACRONYM>
+<BR />
+<ADDRESS ID="Test-ADDRESS" TITLE="ADDRESS Element" LANG="en" DIR="ltr" CLASS="ADDRESS-class">Gaithersburg, MD 20899</ADDRESS>
+<BR />
+<NOFRAMES ID="Test-NOFRAMES" TITLE="NOFRAMES Element" LANG="en" DIR="ltr" CLASS="NOFRAMES-class">Not</NOFRAMES>
+<BR />
+<NOSCRIPT ID="Test-NOSCRIPT" TITLE="NOSCRIPT Element" LANG="en" DIR="ltr" CLASS="NOSCRIPT-class">Not</NoScript>
+<BR />
+<U ID="Test-U" TITLE="U Element" LANG="en" DIR="ltr" CLASS="U-class">Underlined</U>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/element.xhtml b/dom/tests/mochitest/dom-level2-html/files/element.xhtml
new file mode 100644
index 0000000000..ee996015d1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/element.xhtml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html lang="en" dir="ltr" xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Element</title>
+</head>
+<body onload="parent.loadComplete()">
+<center id="Test-CENTER" title="CENTER Element" lang="en" dir="ltr" class="CENTER-class">
+<object align="middle"></object>
+</center>
+<center>
+<p align="center">Test Lists</p>
+</center>
+<br />
+<ol compact="compact" start="1" type="1">
+ <li type="square" value="2">EMP0001
+ <ul compact="compact" type="disc">
+ <li>Margaret Martin
+ <dl>
+ <dd id="Test-DD" title="DD Element" lang="en" dir="ltr" class="DD-class">Accountant</dd>
+ <dd>56,000</dd>
+ <dd>Female</dd>
+ <dd>1230 North Ave. Dallas, Texas 98551</dd>
+ </dl>
+ </li>
+ </ul>
+ </li>
+</ol>
+<br />
+<b id="Test-B" title="B Element" lang="en" dir="ltr" class="B-class">Bold</b>
+<br />
+<dl>
+ <dt id="Test-DT" title="DT Element" lang="en" dir="ltr" class="DT-class">DT element</dt>
+</dl>
+<br />
+<bdo id="Test-BDO" title="BDO Element" lang="en" dir="ltr" class="BDO-class">Bidirectional algorithm overide
+</bdo>
+<br />
+<i id="Test-I" title="I Element" lang="en" dir="ltr" class="I-class">Italicized</i>
+<br />
+<span id="Test-SPAN" title="SPAN Element" lang="en" dir="ltr" class="SPAN-class"></span>
+<br />
+<tt id="Test-TT" title="TT Element" lang="en" dir="ltr" class="TT-class">Teletype</tt>
+<br />
+<sub id="Test-SUB" title="SUB Element" lang="en" dir="ltr" class="SUB-class">Subscript</sub>
+<br />
+<sup id="Test-SUP" title="SUP Element" lang="en" dir="ltr" class="SUP-class">SuperScript</sup>
+<br />
+<s id="Test-S" title="S Element" lang="en" dir="ltr" class="S-class">Strike Through (S)</s>
+<br />
+<strike id="Test-STRIKE" title="STRIKE Element" lang="en" dir="ltr" class="STRIKE-class">Strike Through (STRIKE)</strike>
+<br />
+<small id="Test-SMALL" title="SMALL Element" lang="en" dir="ltr" class="SMALL-class">Small</small>
+<br />
+<big id="Test-BIG" title="BIG Element" lang="en" dir="ltr" class="BIG-class">Big</big>
+<br />
+<em id="Test-EM" title="EM Element" lang="en" dir="ltr" class="EM-class">Emphasis</em>
+<br />
+<strong id="Test-STRONG" title="STRONG Element" lang="en" dir="ltr" class="STRONG-class">Strong</strong>
+<br />
+<dfn id="Test-DFN" title="DFN Element" lang="en" dir="ltr" class="DFN-class">
+ <code id="Test-CODE" title="CODE Element" lang="en" dir="ltr" class="CODE-class">10 Computer Code Fragment 20 Temp = 10</code>
+ <samp id="Test-SAMP" title="SAMP Element" lang="en" dir="ltr" class="SAMP-class">Temp = 20</samp>
+ <kbd id="Test-KBD" title="KBD Element" lang="en" dir="ltr" class="KBD-class">*2</kbd>
+ <var id="Test-VAR" title="VAR Element" lang="en" dir="ltr" class="VAR-class">Temp</var>
+ <cite id="Test-CITE" title="CITE Element" lang="en" dir="ltr" class="CITE-class">Citation</cite>
+</dfn>
+<br />
+<abbr id="Test-ABBR" title="ABBR Element" lang="en" dir="ltr" class="ABBR-class">Temp</abbr>
+<br />
+<acronym id="Test-ACRONYM" title="ACRONYM Element" lang="en" dir="ltr" class="ACRONYM-class">NIST</acronym>
+<br />
+<address id="Test-ADDRESS" title="ADDRESS Element" lang="en" dir="ltr" class="ADDRESS-class">Gaithersburg, MD 20899</address>
+<br />
+<noframes id="Test-NOFRAMES" title="NOFRAMES Element" lang="en" dir="ltr" class="NOFRAMES-class">Not</noframes>
+<br />
+<noscript id="Test-NOSCRIPT" title="NOSCRIPT Element" lang="en" dir="ltr" class="NOSCRIPT-class">Not</noscript>
+<br />
+<u id="Test-U" title="U Element" lang="en" dir="ltr" class="U-class">Underlined</u>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/element.xml b/dom/tests/mochitest/dom-level2-html/files/element.xml
new file mode 100644
index 0000000000..ee996015d1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/element.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html lang="en" dir="ltr" xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Element</title>
+</head>
+<body onload="parent.loadComplete()">
+<center id="Test-CENTER" title="CENTER Element" lang="en" dir="ltr" class="CENTER-class">
+<object align="middle"></object>
+</center>
+<center>
+<p align="center">Test Lists</p>
+</center>
+<br />
+<ol compact="compact" start="1" type="1">
+ <li type="square" value="2">EMP0001
+ <ul compact="compact" type="disc">
+ <li>Margaret Martin
+ <dl>
+ <dd id="Test-DD" title="DD Element" lang="en" dir="ltr" class="DD-class">Accountant</dd>
+ <dd>56,000</dd>
+ <dd>Female</dd>
+ <dd>1230 North Ave. Dallas, Texas 98551</dd>
+ </dl>
+ </li>
+ </ul>
+ </li>
+</ol>
+<br />
+<b id="Test-B" title="B Element" lang="en" dir="ltr" class="B-class">Bold</b>
+<br />
+<dl>
+ <dt id="Test-DT" title="DT Element" lang="en" dir="ltr" class="DT-class">DT element</dt>
+</dl>
+<br />
+<bdo id="Test-BDO" title="BDO Element" lang="en" dir="ltr" class="BDO-class">Bidirectional algorithm overide
+</bdo>
+<br />
+<i id="Test-I" title="I Element" lang="en" dir="ltr" class="I-class">Italicized</i>
+<br />
+<span id="Test-SPAN" title="SPAN Element" lang="en" dir="ltr" class="SPAN-class"></span>
+<br />
+<tt id="Test-TT" title="TT Element" lang="en" dir="ltr" class="TT-class">Teletype</tt>
+<br />
+<sub id="Test-SUB" title="SUB Element" lang="en" dir="ltr" class="SUB-class">Subscript</sub>
+<br />
+<sup id="Test-SUP" title="SUP Element" lang="en" dir="ltr" class="SUP-class">SuperScript</sup>
+<br />
+<s id="Test-S" title="S Element" lang="en" dir="ltr" class="S-class">Strike Through (S)</s>
+<br />
+<strike id="Test-STRIKE" title="STRIKE Element" lang="en" dir="ltr" class="STRIKE-class">Strike Through (STRIKE)</strike>
+<br />
+<small id="Test-SMALL" title="SMALL Element" lang="en" dir="ltr" class="SMALL-class">Small</small>
+<br />
+<big id="Test-BIG" title="BIG Element" lang="en" dir="ltr" class="BIG-class">Big</big>
+<br />
+<em id="Test-EM" title="EM Element" lang="en" dir="ltr" class="EM-class">Emphasis</em>
+<br />
+<strong id="Test-STRONG" title="STRONG Element" lang="en" dir="ltr" class="STRONG-class">Strong</strong>
+<br />
+<dfn id="Test-DFN" title="DFN Element" lang="en" dir="ltr" class="DFN-class">
+ <code id="Test-CODE" title="CODE Element" lang="en" dir="ltr" class="CODE-class">10 Computer Code Fragment 20 Temp = 10</code>
+ <samp id="Test-SAMP" title="SAMP Element" lang="en" dir="ltr" class="SAMP-class">Temp = 20</samp>
+ <kbd id="Test-KBD" title="KBD Element" lang="en" dir="ltr" class="KBD-class">*2</kbd>
+ <var id="Test-VAR" title="VAR Element" lang="en" dir="ltr" class="VAR-class">Temp</var>
+ <cite id="Test-CITE" title="CITE Element" lang="en" dir="ltr" class="CITE-class">Citation</cite>
+</dfn>
+<br />
+<abbr id="Test-ABBR" title="ABBR Element" lang="en" dir="ltr" class="ABBR-class">Temp</abbr>
+<br />
+<acronym id="Test-ACRONYM" title="ACRONYM Element" lang="en" dir="ltr" class="ACRONYM-class">NIST</acronym>
+<br />
+<address id="Test-ADDRESS" title="ADDRESS Element" lang="en" dir="ltr" class="ADDRESS-class">Gaithersburg, MD 20899</address>
+<br />
+<noframes id="Test-NOFRAMES" title="NOFRAMES Element" lang="en" dir="ltr" class="NOFRAMES-class">Not</noframes>
+<br />
+<noscript id="Test-NOSCRIPT" title="NOSCRIPT Element" lang="en" dir="ltr" class="NOSCRIPT-class">Not</noscript>
+<br />
+<u id="Test-U" title="U Element" lang="en" dir="ltr" class="U-class">Underlined</u>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/fieldset.html b/dom/tests/mochitest/dom-level2-html/files/fieldset.html
new file mode 100644
index 0000000000..312ea44208
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/fieldset.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FieldSet</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form2" ACTION="..." METHOD="POST">
+<FIELDSET>
+<LEGEND>All data entered must be valid</LEGEND>
+</FIELDSET>
+</FORM>
+<TABLE SUMMARY="Table 1">
+<TR>
+<TD>
+<FIELDSET>
+<LEGEND>All data entered must be valid</LEGEND>
+</FIELDSET>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/fieldset.xhtml b/dom/tests/mochitest/dom-level2-html/files/fieldset.xhtml
new file mode 100644
index 0000000000..dcfeba133e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/fieldset.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FieldSet</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form2" action="..." method="post">
+<fieldset>
+<legend>All data entered must be valid</legend>
+</fieldset>
+</form>
+<table summary="Table 1">
+<tr>
+<td>
+<fieldset>
+<legend>All data entered must be valid</legend>
+</fieldset>
+</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/fieldset.xml b/dom/tests/mochitest/dom-level2-html/files/fieldset.xml
new file mode 100644
index 0000000000..dcfeba133e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/fieldset.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FieldSet</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form2" action="..." method="post">
+<fieldset>
+<legend>All data entered must be valid</legend>
+</fieldset>
+</form>
+<table summary="Table 1">
+<tr>
+<td>
+<fieldset>
+<legend>All data entered must be valid</legend>
+</fieldset>
+</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/font.html b/dom/tests/mochitest/dom-level2-html/files/font.html
new file mode 100644
index 0000000000..894e442417
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/font.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Font</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FONT COLOR="#000000" FACE="arial,helvetica" SIZE="4">Test Tables</FONT>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/font.xhtml b/dom/tests/mochitest/dom-level2-html/files/font.xhtml
new file mode 100644
index 0000000000..818db76bc9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/font.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BaseFont</title>
+</head>
+<body onload="parent.loadComplete()">
+<font color="#000000" face="arial,helvitica" size="4">Test Tables</font>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/font.xml b/dom/tests/mochitest/dom-level2-html/files/font.xml
new file mode 100644
index 0000000000..818db76bc9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/font.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BaseFont</title>
+</head>
+<body onload="parent.loadComplete()">
+<font color="#000000" face="arial,helvitica" size="4">Test Tables</font>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form.html b/dom/tests/mochitest/dom-level2-html/files/form.html
new file mode 100644
index 0000000000..d8bf02424c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FORM</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACCEPT-CHARSET="US-ASCII" ACTION="./files/getData.pl" ENCTYPE="application/x-www-form-urlencoded" METHOD="post">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7"></TEXTAREA>
+<INPUT TYPE="submit" NAME="submit1" VALUE="Submit" />
+<INPUT TYPE="reset" NAME="submit2" VALUE="Reset" />
+</P>
+</FORM>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/form.xhtml b/dom/tests/mochitest/dom-level2-html/files/form.xhtml
new file mode 100644
index 0000000000..40d6bf0faf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FORM</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form.xml b/dom/tests/mochitest/dom-level2-html/files/form.xml
new file mode 100644
index 0000000000..40d6bf0faf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FORM</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form2.html b/dom/tests/mochitest/dom-level2-html/files/form2.html
new file mode 100644
index 0000000000..c44b6726d5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FORM</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" TARGET="dynamic" ACCEPT-CHARSET="US-ASCII" ACTION="./files/getData.pl" ENCTYPE="application/x-www-form-urlencoded" METHOD="post">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7"></TEXTAREA>
+<INPUT TYPE="submit" NAME="submit1" VALUE="Submit" />
+<INPUT TYPE="reset" NAME="submit2" VALUE="Reset" />
+</P>
+</FORM>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form2.xhtml b/dom/tests/mochitest/dom-level2-html/files/form2.xhtml
new file mode 100644
index 0000000000..e639432bfc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form2.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FORM</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" target="dynamic" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form2.xml b/dom/tests/mochitest/dom-level2-html/files/form2.xml
new file mode 100644
index 0000000000..e639432bfc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form2.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FORM</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" target="dynamic" accept-charset="US-ASCII" action="./files/getData.pl" enctype="application/x-www-form-urlencoded" method="post">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form3.html b/dom/tests/mochitest/dom-level2-html/files/form3.html
new file mode 100644
index 0000000000..543d09efb4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form3.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>FORM3</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACTION="about:blank">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7"></TEXTAREA>
+<INPUT TYPE="submit" NAME="submit1" VALUE="Submit" />
+<INPUT TYPE="reset" NAME="submit2" VALUE="Reset" />
+</P>
+</FORM>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/form3.xhtml b/dom/tests/mochitest/dom-level2-html/files/form3.xhtml
new file mode 100644
index 0000000000..48f5019cba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form3.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>FORM3</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="about:blank">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/form3.xml b/dom/tests/mochitest/dom-level2-html/files/form3.xml
new file mode 100644
index 0000000000..bbed66fbe9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/form3.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>FORM3</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="about:blank">
+<p>
+<textarea id="text1" cols="20" rows="7"></textarea>
+<input type="submit" name="submit1" value="Submit" />
+<input type="reset" name="submit2" value="Reset" />
+</p>
+</form>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame.html b/dom/tests/mochitest/dom-level2-html/files/frame.html
new file mode 100644
index 0000000000..41182c9be3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
+"http://www.w3.org/TR/html4/frameset.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FRAME</TITLE>
+</HEAD>
+<FRAMESET COLS="20, 80" onload="parent.loadComplete()">
+<FRAMESET ROWS="100, 200">
+<FRAME LONGDESC="about:blank" MARGINHEIGHT="10" MARGINWIDTH="5" NORESIZE="NORESIZE" NAME="Frame1" FRAMEBORDER="1" SCROLLING="yes" SRC="right.png">
+</FRAMESET>
+<FRAME SRC="w3c_main.png">
+</FRAMESET>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame.xhtml b/dom/tests/mochitest/dom-level2-html/files/frame.xhtml
new file mode 100644
index 0000000000..bbe00fac1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAME</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame longdesc="about:blank" marginheight="10" marginwidth="5" noresize="noresize" name="Frame1" frameborder="1" scrolling="yes" src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame.xml b/dom/tests/mochitest/dom-level2-html/files/frame.xml
new file mode 100644
index 0000000000..bbe00fac1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAME</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame longdesc="about:blank" marginheight="10" marginwidth="5" noresize="noresize" name="Frame1" frameborder="1" scrolling="yes" src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame2.html b/dom/tests/mochitest/dom-level2-html/files/frame2.html
new file mode 100644
index 0000000000..6030ec5f54
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
+"http://www.w3.org/TR/html4/frameset.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FRAME2</TITLE>
+<!-- required by frame contents -->
+<SCRIPT type="text/javascript">function loadComplete() { }</SCRIPT>
+</HEAD>
+<FRAMESET COLS="20, 80" onload="parent.loadComplete()">
+<FRAMESET ROWS="100, 200">
+<FRAME ID="Frame1" NAME="Frame1" SRC="frame.html">
+</FRAMESET>
+<FRAME ID="Frame2" NAME="Frame2" SRC="iframe.html">
+</FRAMESET>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame2.xhtml b/dom/tests/mochitest/dom-level2-html/files/frame2.xhtml
new file mode 100644
index 0000000000..09008eb864
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame2.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAME2</title>
+<!-- required by frame contents -->
+<script type="text/javascript">function loadComplete() { }</script>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame id="Frame1" name="Frame1" src="frame.xhtml"/>
+</frameset>
+<frame id="Frame2" name="Frame2" src="iframe.xhtml"/>
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frame2.xml b/dom/tests/mochitest/dom-level2-html/files/frame2.xml
new file mode 100644
index 0000000000..615f234068
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frame2.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAME2</title>
+<script type="text/javascript">function loadComplete() { }</script>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame id="Frame1" name="Frame1" src="frame.html"/>
+</frameset>
+<frame id="Frame2" name="Frame2" src="iframe.html"/>
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frameset.html b/dom/tests/mochitest/dom-level2-html/files/frameset.html
new file mode 100644
index 0000000000..f208fe0559
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frameset.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
+"http://www.w3.org/TR/html4/frameset.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - FRAMESET</TITLE>
+</HEAD>
+<FRAMESET COLS="20, 80" onload="parent.loadComplete()">
+<FRAMESET ROWS="100, 200">
+<FRAME SRC="right.png">
+</FRAMESET>
+<FRAME SRC="w3c_main.png">
+</FRAMESET>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frameset.xhtml b/dom/tests/mochitest/dom-level2-html/files/frameset.xhtml
new file mode 100644
index 0000000000..2035bd9c80
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frameset.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAMESET</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/frameset.xml b/dom/tests/mochitest/dom-level2-html/files/frameset.xml
new file mode 100644
index 0000000000..2035bd9c80
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/frameset.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "xhtml1-frameset.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - FRAMESET</title>
+</head>
+<frameset cols="20, 80" onload="parent.loadComplete()">
+<frameset rows="100, 200">
+<frame src="right.png" />
+</frameset>
+<frame src="w3c_main.png" />
+</frameset>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/heading.html b/dom/tests/mochitest/dom-level2-html/files/heading.html
new file mode 100644
index 0000000000..90d388c0f6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/heading.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - HEADING</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<H1 ALIGN="center">Head Element 1</H1>
+<H2 ALIGN="left">Head Element 2</H2>
+<H3 ALIGN="right">Head Element 3</H3>
+<H4 ALIGN="justify">Head Element 4</H4>
+<H5 ALIGN="center">Head Element 5</H5>
+<H6 ALIGN="left">Head Element 6</H6>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/heading.xhtml b/dom/tests/mochitest/dom-level2-html/files/heading.xhtml
new file mode 100644
index 0000000000..3fda259f19
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/heading.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - HEADING</title>
+</head>
+<body onload="parent.loadComplete()">
+<h1 align="center">Head Element 1</h1>
+<h2 align="left">Head Element 2</h2>
+<h3 align="right">Head Element 3</h3>
+<h4 align="right">Head Element 4</h4>
+<h5 align="center">Head Element 5</h5>
+<h6 align="left">Head Element 6</h6>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/heading.xml b/dom/tests/mochitest/dom-level2-html/files/heading.xml
new file mode 100644
index 0000000000..3fda259f19
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/heading.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - HEADING</title>
+</head>
+<body onload="parent.loadComplete()">
+<h1 align="center">Head Element 1</h1>
+<h2 align="left">Head Element 2</h2>
+<h3 align="right">Head Element 3</h3>
+<h4 align="right">Head Element 4</h4>
+<h5 align="center">Head Element 5</h5>
+<h6 align="left">Head Element 6</h6>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/hr.html b/dom/tests/mochitest/dom-level2-html/files/hr.html
new file mode 100644
index 0000000000..9c4faccd0b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/hr.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - HR</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<HR ALIGN="center" NOSHADE="noShade" SIZE="5" WIDTH="400" />
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/hr.xhtml b/dom/tests/mochitest/dom-level2-html/files/hr.xhtml
new file mode 100644
index 0000000000..685de35151
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/hr.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - HR</title>
+</head>
+<body onload="parent.loadComplete()">
+<hr align="center" noshade="noshade" size="5" width="400"/>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/hr.xml b/dom/tests/mochitest/dom-level2-html/files/hr.xml
new file mode 100644
index 0000000000..685de35151
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/hr.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - HR</title>
+</head>
+<body onload="parent.loadComplete()">
+<hr align="center" noshade="noshade" size="5" width="400"/>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/html.html b/dom/tests/mochitest/dom-level2-html/files/html.html
new file mode 100644
index 0000000000..2c91731e45
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/html.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML VERSION="-//W3C//DTD HTML 4.01 Transitional//EN">
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - Html</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>Hello, World.</P>
+</BODY>
+</HTML>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/html.xhtml b/dom/tests/mochitest/dom-level2-html/files/html.xhtml
new file mode 100644
index 0000000000..f07d2c1387
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/html.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Html</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Hello, World.</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/html.xml b/dom/tests/mochitest/dom-level2-html/files/html.xml
new file mode 100644
index 0000000000..f07d2c1387
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/html.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - Html</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Hello, World.</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe.html b/dom/tests/mochitest/dom-level2-html/files/iframe.html
new file mode 100644
index 0000000000..0a44fc3354
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - IFRAME</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<IFRAME LONGDESC="about:blank" MARGINHEIGHT="10" MARGINWIDTH="5" WIDTH="60" HEIGHT="50" NAME="Iframe1" FRAMEBORDER="1" SCROLLING="yes" SRC="right.png" ALIGN="top">IFRAME1</IFRAME>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe.xhtml b/dom/tests/mochitest/dom-level2-html/files/iframe.xhtml
new file mode 100644
index 0000000000..93326c8178
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe.xhtml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IFRAME</title>
+</head>
+<body onload="parent.loadComplete()">
+<iframe longdesc="about:blank" marginheight="10" marginwidth="5" width="60" height="50" name="Iframe1" frameborder="1" scrolling="yes" src="right.png" align="top">IFRAME1</iframe>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe.xml b/dom/tests/mochitest/dom-level2-html/files/iframe.xml
new file mode 100644
index 0000000000..93326c8178
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IFRAME</title>
+</head>
+<body onload="parent.loadComplete()">
+<iframe longdesc="about:blank" marginheight="10" marginwidth="5" width="60" height="50" name="Iframe1" frameborder="1" scrolling="yes" src="right.png" align="top">IFRAME1</iframe>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe2.html b/dom/tests/mochitest/dom-level2-html/files/iframe2.html
new file mode 100644
index 0000000000..7f302b8433
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - IFRAME2</TITLE>
+<!-- required by frame contents -->
+<SCRIPT type="text/javascript">function loadComplete() { }</SCRIPT>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<IFRAME ID="Iframe1" NAME="Iframe1" SRC="iframe.html">IFRAME1</IFRAME>
+<IFRAME ID="Iframe2" SRC="frame.html" NAME="Iframe2">IFRAME2</IFRAME>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe2.xhtml b/dom/tests/mochitest/dom-level2-html/files/iframe2.xhtml
new file mode 100644
index 0000000000..a1b1011396
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe2.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IFRAME2</title>
+<!-- required by frame contents -->
+<script type="text/javascript">function loadComplete() { }</script>
+</head>
+<body onload="parent.loadComplete()">
+<iframe id="Iframe1" name="Iframe1" src="iframe.html">IFRAME1</iframe>
+<iframe id="Iframe2" src="frame.html" name="Iframe2">IFRAME2</iframe>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/iframe2.xml b/dom/tests/mochitest/dom-level2-html/files/iframe2.xml
new file mode 100644
index 0000000000..a1b1011396
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/iframe2.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IFRAME2</title>
+<!-- required by frame contents -->
+<script type="text/javascript">function loadComplete() { }</script>
+</head>
+<body onload="parent.loadComplete()">
+<iframe id="Iframe1" name="Iframe1" src="iframe.html">IFRAME1</iframe>
+<iframe id="Iframe2" src="frame.html" name="Iframe2">IFRAME2</iframe>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/img.html b/dom/tests/mochitest/dom-level2-html/files/img.html
new file mode 100644
index 0000000000..b4e8b270eb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/img.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - IMG</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<IMG ID="IMAGE-1" NAME="IMAGE-1" SRC="./pix/dts.gif" ALIGN="middle" ALT="DTS IMAGE LOGO" BORDER="0" HEIGHT="47" HSPACE="4" LONGDESC="./files/desc.html" USEMAP="#DTS-MAP" VSPACE="10" WIDTH="115"/>
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/img.xhtml b/dom/tests/mochitest/dom-level2-html/files/img.xhtml
new file mode 100644
index 0000000000..40e3695b9c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/img.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IMG</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<img id="IMAGE-1" name="IMAGE-1" src="./pix/dts.gif" align="middle" alt="DTS IMAGE LOGO" border="0" height="47" hspace="4" longdesc="./files/desc.html" usemap="#DTS-MAP" vspace="10" width="115"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/img.xml b/dom/tests/mochitest/dom-level2-html/files/img.xml
new file mode 100644
index 0000000000..40e3695b9c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/img.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - IMG</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<img id="IMAGE-1" name="IMAGE-1" src="./pix/dts.gif" align="middle" alt="DTS IMAGE LOGO" border="0" height="47" hspace="4" longdesc="./files/desc.html" usemap="#DTS-MAP" vspace="10" width="115"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/index.html b/dom/tests/mochitest/dom-level2-html/files/index.html
new file mode 100644
index 0000000000..ee49e443c4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/index.html
@@ -0,0 +1,216 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Index of /2004/04/ecmascript/level2/html/files</title>
+ </head>
+ <body>
+<h1>Index of /2004/04/ecmascript/level2/html/files</h1>
+<table><tr><th><img src="/icons/blank.gif" alt="[ICO]" width="20" height="22" /></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr /></th></tr>
+<tr><td valign="top"><img src="/icons/back.gif" alt="[DIR]" width="20" height="22" /></td><td><a href="/2004/04/ecmascript/level2/html/">Parent Directory</a></td><td>&nbsp;</td><td align="right"> - </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="anchor.html">anchor.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">490 </td><td>NIST DOM HTML Test - Anchor</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="anchor.xhtml">anchor.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">530 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="anchor.xml">anchor.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">530 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="anchor2.html">anchor2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">367 </td><td>NIST DOM HTML Test - Anchor</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="anchor2.xhtml">anchor2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">367 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="anchor2.xml">anchor2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">367 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="applet.html">applet.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">446 </td><td>NIST DOM HTML Test - Applet</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="applet.xhtml">applet.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">487 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="applet.xml">applet.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">487 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="applet2.html">applet2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">432 </td><td>NIST DOM HTML Test - Applet</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="applet2.xhtml">applet2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">473 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="applet2.xml">applet2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">473 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="area.html">area.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">405 </td><td>NIST DOM HTML Test - Area</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="area.xhtml">area.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">448 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="area.xml">area.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">448 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="area2.html">area2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">400 </td><td>NIST DOM HTML Test - Area</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="area2.xhtml">area2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">401 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="area2.xml">area2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">401 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="base.html">base.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">292 </td><td>NIST DOM HTML Test - Base</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="base.xhtml">base.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">321 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="base.xml">base.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">321 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="base2.html">base2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">544 </td><td>NIST DOM HTML Test - Base2</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="base2.xhtml">base2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">542 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="base2.xml">base2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">542 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="body.html">body.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">379 </td><td>NIST DOM HTML Test - Body</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="body.xhtml">body.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">476 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="body.xml">body.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">476 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="br.html">br.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">274 </td><td>NIST DOM HTML Test - BR</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="br.xhtml">br.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">315 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="br.xml">br.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">315 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="button.html">button.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">550 </td><td>NIST DOM HTML Test - Button</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="button.xhtml">button.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">592 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="button.xml">button.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">592 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="collection.html">collection.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">2.1K</td><td>NIST DOM HTML Test - SELECT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="collection.xhtml">collection.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">2.2K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="collection.xml">collection.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">2.2K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="directory.html">directory.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">369 </td><td>NIST DOM HTML Test - Directory</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="directory.xhtml">directory.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">409 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="directory.xml">directory.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">409 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="div.html">div.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">351 </td><td>NIST DOM HTML Test - DIV</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="div.xhtml">div.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">391 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="div.xml">div.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">391 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="dl.html">dl.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">373 </td><td>NIST DOM HTML Test - DL</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="dl.xhtml">dl.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">413 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="dl.xml">dl.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">413 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="document.html">document.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.5K</td><td>NIST DOM HTML Test - DOCUMENT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="document.xhtml">document.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.6K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="document.xml">document.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.6K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="element.html">element.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">3.5K</td><td>NIST DOM HTML Test - Element</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="element.xhtml">element.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">3.5K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="element.xml">element.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">3.5K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="fieldset.html">fieldset.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">505 </td><td>NIST DOM HTML Test - FieldSet</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="fieldset.xhtml">fieldset.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">545 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="fieldset.xml">fieldset.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">545 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="font.html">font.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">322 </td><td>NIST DOM HTML Test - Font</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="font.xhtml">font.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">366 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="font.xml">font.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">366 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="form.html">form.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">544 </td><td>NIST DOM HTML Test - FORM</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form.xhtml">form.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">594 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form.xml">form.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">594 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="form2.html">form2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">613 </td><td>NIST DOM HTML Test - FORM</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form2.xhtml">form2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">611 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form2.xml">form2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">611 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="form3.html">form3.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">433 </td><td>FORM3</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form3.xhtml">form3.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">489 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="form3.xml">form3.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">471 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="frame.html">frame.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">524 </td><td>NIST DOM HTML Test - FRAME</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frame.xhtml">frame.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">522 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frame.xml">frame.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">522 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="frame2.html">frame2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">560 </td><td>NIST DOM HTML Test - FRAME2</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frame2.xhtml">frame2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">558 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frame2.xml">frame2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">518 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="frameset.html">frameset.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">403 </td><td>NIST DOM HTML Test - FRAMESET</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frameset.xhtml">frameset.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">402 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="frameset.xml">frameset.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">402 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="heading.html">heading.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">483 </td><td>NIST DOM HTML Test - HEADING</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="heading.xhtml">heading.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">521 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="heading.xml">heading.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">521 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="hr.html">hr.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">309 </td><td>NIST DOM HTML Test - HR</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="hr.xhtml">hr.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">348 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="hr.xml">hr.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">348 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="html.html">html.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">321 </td><td>NIST DOM HTML Test - Html</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="html.xhtml">html.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">300 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="html.xml">html.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">300 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="iframe.html">iframe.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">431 </td><td>NIST DOM HTML Test - IFRAME</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="iframe.xhtml">iframe.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">471 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="iframe.xml">iframe.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">471 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="iframe2.html">iframe2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">499 </td><td>NIST DOM HTML Test - IFRAME2</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="iframe2.xhtml">iframe2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">539 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="iframe2.xml">iframe2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">539 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="img.html">img.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">454 </td><td>NIST DOM HTML Test - IMG</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="img.xhtml">img.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">494 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="img.xml">img.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">494 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="input.html">input.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.7K</td><td>NIST DOM HTML Test - INPUT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="input.xhtml">input.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.7K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="input.xml">input.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.7K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="isindex.html">isindex.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">389 </td><td>NIST DOM HTML Test - ISINDEX</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="isindex.xhtml">isindex.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">430 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="isindex.xml">isindex.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">430 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="label.html">label.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">572 </td><td>NIST DOM HTML Test - LABEL</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="label.xhtml">label.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">612 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="label.xml">label.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">612 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="legend.html">legend.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">599 </td><td>NIST DOM HTML Test - LEGEND</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="legend.xhtml">legend.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">638 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="legend.xml">legend.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">638 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="li.html">li.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">401 </td><td>NIST DOM HTML Test - LI</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="li.xhtml">li.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">441 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="li.xml">li.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">441 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="link.html">link.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">492 </td><td>NIST DOM HTML Test - LINK</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="link.xhtml">link.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">535 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="link.xml">link.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">535 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="link2.html">link2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">548 </td><td>NIST DOM HTML Test - LINK</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="link2.xhtml">link2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">552 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="link2.xml">link2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">552 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="map.html">map.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">479 </td><td>NIST DOM HTML Test - MAP</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="map.xhtml">map.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">523 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="map.xml">map.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">523 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="menu.html">menu.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">346 </td><td>NIST DOM HTML Test - MENU</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="menu.xhtml">menu.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">386 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="menu.xml">menu.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">386 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="meta.html">meta.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">283 </td><td>NIST DOM HTML Test - META</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="meta.xhtml">meta.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">393 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="meta.xml">meta.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">393 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="mod.html">mod.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">558 </td><td>NIST DOM HTML Test - MOD</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="mod.xhtml">mod.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">599 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="mod.xml">mod.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">599 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="object.html">object.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">669 </td><td>NIST DOM HTML Test - OBJECT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="object.xhtml">object.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">709 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="object.xml">object.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">709 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="object2.html">object2.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">666 </td><td>NIST DOM HTML Test - OBJECT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="object2.xhtml">object2.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">707 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="object2.xml">object2.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">707 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="olist.html">olist.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">502 </td><td>NIST DOM HTML Test - OLIST</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="olist.xhtml">olist.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">542 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="olist.xml">olist.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">542 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="optgroup.html">optgroup.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">587 </td><td>NIST DOM HTML Test - OPTGROUP</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="optgroup.xhtml">optgroup.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">628 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="optgroup.xml">optgroup.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">628 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="option.html">option.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">836 </td><td>NIST DOM HTML Test - OPTION</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="option.xhtml">option.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">858 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="option.xml">option.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">858 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="optionscollection.html">optionscollection.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">847 </td><td>NIST DOM HTML Test - OPTIONSCOLLECTION</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="optionscollection.xhtml">optionscollection.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">869 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="optionscollection.xml">optionscollection.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">869 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="paragraph.html">paragraph.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">284 </td><td>NIST DOM HTML Test - PARAGRAPH</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="paragraph.xhtml">paragraph.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">324 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="paragraph.xml">paragraph.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">324 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="param.html">param.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">343 </td><td>NIST DOM HTML Test - PARAM</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="param.xhtml">param.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">386 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="param.xml">param.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">386 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="pre.html">pre.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">549 </td><td>NIST DOM HTML Test - PRE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="pre.xhtml">pre.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">565 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="pre.xml">pre.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">565 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="quote.html">quote.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">440 </td><td>NIST DOM HTML Test - QUOTE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="quote.xhtml">quote.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">481 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="quote.xml">quote.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">481 </td></tr>
+<tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]" width="20" height="22" /></td><td><a href="right.png">right.png</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">137 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="script.html">script.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">359 </td><td>NIST DOM HTML Test - SCRIPT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="script.xhtml">script.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">399 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="script.xml">script.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">399 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="select.html">select.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.0K</td><td>NIST DOM HTML Test - SELECT</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="select.xhtml">select.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.0K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="select.xml">select.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.0K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="style.html">style.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">319 </td><td>NIST DOM HTML Test - STYLE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="style.xhtml">style.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">356 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="style.xml">style.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">356 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="table.html">table.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.9K</td><td>NIST DOM HTML Test - TABLE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="table.xhtml">table.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.9K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="table.xml">table.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.9K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="table1.html">table1.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">336 </td><td>NIST DOM HTML Test - TABLE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="table1.xhtml">table1.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">378 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="table1.xml">table1.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">378 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="tablecaption.html">tablecaption.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">435 </td><td>NIST DOM HTML Test - TABLECAPTION</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecaption.xhtml">tablecaption.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">453 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecaption.xml">tablecaption.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">453 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="tablecell.html">tablecell.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">909 </td><td>NIST DOM HTML Test - TABLECELL</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecell.xhtml">tablecell.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">944 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecell.xml">tablecell.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">944 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="tablecol.html">tablecol.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">629 </td><td>NIST DOM HTML Test - TABLECOL</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecol.xhtml">tablecol.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">656 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablecol.xml">tablecol.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">656 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="tablerow.html">tablerow.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.7K</td><td>NIST DOM HTML Test - TABLEROW</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablerow.xhtml">tablerow.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.8K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablerow.xml">tablerow.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.8K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="tablesection.html">tablesection.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.8K</td><td>NIST DOM HTML Test - TABLESECTION</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablesection.xhtml">tablesection.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.9K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="tablesection.xml">tablesection.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">1.9K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="textarea.html">textarea.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">938 </td><td>NIST DOM HTML Test - TEXTAREA</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="textarea.xhtml">textarea.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">951 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="textarea.xml">textarea.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">951 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="title.html">title.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">266 </td><td>NIST DOM HTML Test - TITLE</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="title.xhtml">title.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">294 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="title.xml">title.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">294 </td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="ulist.html">ulist.html</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">619 </td><td>NIST DOM HTML Test - ULIST</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="ulist.xhtml">ulist.xhtml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">659 </td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="ulist.xml">ulist.xml</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">659 </td></tr>
+<tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]" width="20" height="22" /></td><td><a href="w3c_main.png">w3c_main.png</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">5.8K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="xhtml-lat1.ent">xhtml-lat1.ent</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right"> 11K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="xhtml-special.ent">xhtml-special.ent</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right">4.0K</td></tr>
+<tr><td valign="top"><img src="/icons/unknown.gif" alt="[ ]" width="20" height="22" /></td><td><a href="xhtml-symbol.ent">xhtml-symbol.ent</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right"> 14K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="xhtml1-frameset.dtd">xhtml1-frameset.dtd</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right"> 32K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="xhtml1-strict.dtd">xhtml1-strict.dtd</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right"> 25K</td></tr>
+<tr><td valign="top"><img src="/icons/text.gif" alt="[TXT]" width="20" height="22" /></td><td><a href="xhtml1-transitional.dtd">xhtml1-transitional.dtd</a></td><td align="right">05-Apr-2004 14:39 </td><td align="right"> 31K</td></tr>
+<tr><th colspan="5"><hr /></th></tr>
+</table>
+</body></html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/input.html b/dom/tests/mochitest/dom-level2-html/files/input.html
new file mode 100644
index 0000000000..c36e87d504
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/input.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - INPUT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE CELLPADDING="15" BORDER="BORDER" SUMMARY="Table 1">
+<TR ALIGN="center">
+<TD VAlign="top">Under a FORM control
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<TABLE BORDER="15" SUMMARY="Table 2">
+<TR>
+<TD>
+<LABEL ACCESSKEY="b" FOR="input1">Enter Your Password:</LABEL>
+</TD>
+<TD>
+<INPUT DIR="LTR" ID="input1" TABINDEX="8" VALUE="Password" TYPE="password" NAME="Password" SIZE="25" MAXLENGTH="5" ALT="Password entry" READONLY="READONLY"/>
+</TD>
+</TR>
+<TR>
+<TD>
+<INPUT TYPE="RADIO" NAME="Radio1" ACCESSKEY="c" VALUE="ReHire"/>ReHire
+</TD>
+</TR>
+<TR>
+<TD>
+<INPUT TYPE="RADIO" NAME="Radio2" VALUE="NewHire" TABINDEX="9" CHECKED="CHECKED"/>NewHire
+</TD>
+</TR>
+<TR>
+<TD>Hours available to work</TD>
+<TD>
+<INPUT TYPE="CHECKBOX" NAME="Check1" ALIGN="bottom" TABINDEX="10" VALUE="EarlyMornings" CHECKED="CHECKED"/>EarlyMornings
+<BR/>
+<INPUT ID="input5" TYPE="CHECKBOX" NAME="Check2" TABINDEX="11" VALUE="AfterNoon" ONCLICK="newId(this)"/>Afternoon
+<BR/>
+<INPUT TYPE="CHECKBOX" NAME="Check3" TABINDEX="12" VALUE="Evenings"/>Evenings
+<BR/>
+<INPUT TYPE="CHECKBOX" NAME="Check4" TABINDEX="13" VALUE="Closing" DISABLED="DISABLED"/>Closing
+<BR/>
+</TD>
+</TR>
+<TR>
+<TD COLSPAN="2">
+<INPUT TYPE="IMAGE" TABINDEX="14" NAME="SubmitImage" USEMAP="#submit-map" SRC="./pix/submit.gif"/>
+</TD>
+</TR>
+<TR>
+<TD COLSPAN="2">
+<INPUT TITLE="old_title" TYPE="FILE" NAME="FileControl" TABINDEX="15" ACCEPT="GIF,JPEG" ONSELECT="newTitle(this)"/>
+</TD>
+</TR>
+</TABLE>
+</FORM>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/input.xhtml b/dom/tests/mochitest/dom-level2-html/files/input.xhtml
new file mode 100644
index 0000000000..b7704ad10e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/input.xhtml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - INPUT</title>
+</head>
+<body onload="parent.loadComplete()">
+<table cellpadding="15" border="border" summary="Table 1">
+<tr align="center">
+<td valign="top">Under a FORM control
+<form id="form1" action="./files/getData.pl" method="post">
+<table border="15" summary="Table 2">
+<tr>
+<td>
+<label accesskey="b" for="input1">Enter Your Password:</label>
+</td>
+<td>
+<input dir="ltr" id="input1" tabindex="8" value="Password" type="password" name="Password" size="25" maxlength="5" alt="Password entry" readonly="readonly"/>
+</td>
+</tr>
+<tr>
+<td>
+<input type="radio" name="Radio1" accesskey="c" value="ReHire"/>
+</td>
+</tr>
+<tr>
+<td>
+<input type="radio" name="Radio2" value="NewHire" tabindex="9" checked="checked"/>
+</td>
+</tr>
+<tr>
+<td>Hours available to work</td>
+<td>
+<input type="checkbox" name="Check1" align="bottom" tabindex="10" value="EarlyMornings" checked="checked"/>
+<br/>
+<input id="input5" type="checkbox" name="Check2" tabindex="11" value="AfterNoon" onclick="newId(this)"/>
+<br/>
+<input type="checkbox" name="Check3" tabindex="12" value="Evenings"/>
+<br/>
+<input type="checkbox" name="Check4" tabindex="13" value="Closing" disabled="disabled"/>
+<br/>
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<input type="image" tabindex="14" name="SubmitImage" usemap="#submit-map" src="./pix/submit.gif"/>
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<input title="old_title" type="file" name="FileControl" tabindex="15" accept="GIF,JPEG" onselect="newTitle(this)"/>
+</td>
+</tr>
+</table>
+</form>
+</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/input.xml b/dom/tests/mochitest/dom-level2-html/files/input.xml
new file mode 100644
index 0000000000..b7704ad10e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/input.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - INPUT</title>
+</head>
+<body onload="parent.loadComplete()">
+<table cellpadding="15" border="border" summary="Table 1">
+<tr align="center">
+<td valign="top">Under a FORM control
+<form id="form1" action="./files/getData.pl" method="post">
+<table border="15" summary="Table 2">
+<tr>
+<td>
+<label accesskey="b" for="input1">Enter Your Password:</label>
+</td>
+<td>
+<input dir="ltr" id="input1" tabindex="8" value="Password" type="password" name="Password" size="25" maxlength="5" alt="Password entry" readonly="readonly"/>
+</td>
+</tr>
+<tr>
+<td>
+<input type="radio" name="Radio1" accesskey="c" value="ReHire"/>
+</td>
+</tr>
+<tr>
+<td>
+<input type="radio" name="Radio2" value="NewHire" tabindex="9" checked="checked"/>
+</td>
+</tr>
+<tr>
+<td>Hours available to work</td>
+<td>
+<input type="checkbox" name="Check1" align="bottom" tabindex="10" value="EarlyMornings" checked="checked"/>
+<br/>
+<input id="input5" type="checkbox" name="Check2" tabindex="11" value="AfterNoon" onclick="newId(this)"/>
+<br/>
+<input type="checkbox" name="Check3" tabindex="12" value="Evenings"/>
+<br/>
+<input type="checkbox" name="Check4" tabindex="13" value="Closing" disabled="disabled"/>
+<br/>
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<input type="image" tabindex="14" name="SubmitImage" usemap="#submit-map" src="./pix/submit.gif"/>
+</td>
+</tr>
+<tr>
+<td colspan="2">
+<input title="old_title" type="file" name="FileControl" tabindex="15" accept="GIF,JPEG" onselect="newTitle(this)"/>
+</td>
+</tr>
+</table>
+</form>
+</td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/isindex.html b/dom/tests/mochitest/dom-level2-html/files/isindex.html
new file mode 100644
index 0000000000..0fd50ceae2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/isindex.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - ISINDEX</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<ISINDEX PROMPT="New Employee: ">
+</FORM>
+<ISINDEX PROMPT="Old Employee: ">
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/isindex.xhtml b/dom/tests/mochitest/dom-level2-html/files/isindex.xhtml
new file mode 100644
index 0000000000..a48d9a5851
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/isindex.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - ISINDEX</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<isindex prompt="New Employee: "/>
+</form>
+<isindex prompt="Old Employee: "/>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/isindex.xml b/dom/tests/mochitest/dom-level2-html/files/isindex.xml
new file mode 100644
index 0000000000..a48d9a5851
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/isindex.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - ISINDEX</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<isindex prompt="New Employee: "/>
+</form>
+<isindex prompt="Old Employee: "/>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/label.html b/dom/tests/mochitest/dom-level2-html/files/label.html
new file mode 100644
index 0000000000..d0abc044ba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/label.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - LABEL</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<LABEL ACCESSKEY="b" FOR="input1">Enter Your First Password:</LABEL>
+<INPUT ID="input1" TYPE="password" NAME="Password1"/>
+</P>
+</FORM>
+<P>
+<LABEL ACCESSKEY="c" FOR="input2">Enter Your Second Password:</LABEL>
+<INPUT ID="input2" TYPE="password" NAME="Password2"/>
+</P>
+</BODY>
+</HTML>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/label.xhtml b/dom/tests/mochitest/dom-level2-html/files/label.xhtml
new file mode 100644
index 0000000000..902584fdeb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/label.xhtml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LABEL</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<label accesskey="b" for="input1">Enter Your First Password:</label>
+<input id="input1" type="password" name="Password1"/>
+</p>
+</form>
+<p>
+<label accesskey="c" for="input2">Enter Your Second Password:</label>
+<input id="input2" type="password" name="Password2"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/label.xml b/dom/tests/mochitest/dom-level2-html/files/label.xml
new file mode 100644
index 0000000000..902584fdeb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/label.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LABEL</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<label accesskey="b" for="input1">Enter Your First Password:</label>
+<input id="input1" type="password" name="Password1"/>
+</p>
+</form>
+<p>
+<label accesskey="c" for="input2">Enter Your Second Password:</label>
+<input id="input2" type="password" name="Password2"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/legend.html b/dom/tests/mochitest/dom-level2-html/files/legend.html
new file mode 100644
index 0000000000..53160eeafa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/legend.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - LEGEND</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<FIELDSET>
+<LEGEND ACCESSKEY="b" ALIGN="top">Enter Password1:</LEGEND>
+<INPUT ID="input1" TYPE="password" NAME="Password1"/>
+</FIELDSET>
+</FORM>
+<FIELDSET>
+<LEGEND ACCESSKEY="c" ALIGN="bottom">Enter Password2:</LEGEND>
+<INPUT ID="input2" TYPE="password" NAME="Password2"/>
+</FIELDSET>
+</BODY>
+</HTML>
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/legend.xhtml b/dom/tests/mochitest/dom-level2-html/files/legend.xhtml
new file mode 100644
index 0000000000..c95e6852a9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/legend.xhtml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LEGEND</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<fieldset>
+<legend accesskey="b" align="top">Enter Password1:</legend>
+<input id="input1" type="password" name="Password1"/>
+</fieldset>
+</form>
+<fieldset>
+<legend accesskey="c" align="bottom">Enter Password2:</legend>
+<input id="input2" type="password" name="Password2"/>
+</fieldset>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/legend.xml b/dom/tests/mochitest/dom-level2-html/files/legend.xml
new file mode 100644
index 0000000000..c95e6852a9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/legend.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LEGEND</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<fieldset>
+<legend accesskey="b" align="top">Enter Password1:</legend>
+<input id="input1" type="password" name="Password1"/>
+</fieldset>
+</form>
+<fieldset>
+<legend accesskey="c" align="bottom">Enter Password2:</legend>
+<input id="input2" type="password" name="Password2"/>
+</fieldset>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/li.html b/dom/tests/mochitest/dom-level2-html/files/li.html
new file mode 100644
index 0000000000..0c97b4c922
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/li.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - LI</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<OL>
+<LI TYPE="square" VALUE="2">EMP0001
+<UL>
+<LI>Margaret Martin
+<DL>
+<DD>Accountant</DD>
+<DD>56,000</DD>
+<DD>Female</DD>
+</DL>
+</LI>
+</UL>
+</LI>
+</OL>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/li.xhtml b/dom/tests/mochitest/dom-level2-html/files/li.xhtml
new file mode 100644
index 0000000000..79af811120
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/li.xhtml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LI</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol>
+<li type="square" value="2">EMP0001
+<ul>
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/li.xml b/dom/tests/mochitest/dom-level2-html/files/li.xml
new file mode 100644
index 0000000000..79af811120
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/li.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LI</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol>
+<li type="square" value="2">EMP0001
+<ul>
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/link.html b/dom/tests/mochitest/dom-level2-html/files/link.html
new file mode 100644
index 0000000000..2d4c082b4f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - LINK</TITLE>
+<LINK CHARSET="Latin-1" HREF="./files/glossary.html" HREFLANG="en" MEDIA="screen" REL="Glossary" TYPE="text/html">
+<LINK CHARSET="Latin-1" HREF="./files/style1.css" HREFLANG="en" MEDIA="screen" REV="stylesheet" TYPE="text/css">
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<BR>
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/link.xhtml b/dom/tests/mochitest/dom-level2-html/files/link.xhtml
new file mode 100644
index 0000000000..5a0f18c241
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LINK</title>
+<link charset="Latin-1" href="./files/glossary.html" hreflang="en" media="screen" rel="Glossary" type="text/html"/>
+<link charset="Latin-1" href="./files/style1.css" hreflang="en" media="screen" rev="stylesheet" type="text/css"/>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/link.xml b/dom/tests/mochitest/dom-level2-html/files/link.xml
new file mode 100644
index 0000000000..5a0f18c241
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LINK</title>
+<link charset="Latin-1" href="./files/glossary.html" hreflang="en" media="screen" rel="Glossary" type="text/html"/>
+<link charset="Latin-1" href="./files/style1.css" hreflang="en" media="screen" rev="stylesheet" type="text/css"/>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/link2.html b/dom/tests/mochitest/dom-level2-html/files/link2.html
new file mode 100644
index 0000000000..12fac9daa6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link2.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - LINK</TITLE>
+<LINK CHARSET="Latin-1" TARGET="dynamic" HREF="./files/glossary.html" HREFLANG="en" MEDIA="screen" REL="Glossary" TYPE="text/html">
+<LINK CHARSET="Latin-1" HREF="./files/style1.css" HREFLANG="en" MEDIA="screen" REV="stylesheet" TYPE="text/css">
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<BR>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/link2.xhtml b/dom/tests/mochitest/dom-level2-html/files/link2.xhtml
new file mode 100644
index 0000000000..95c80048f2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link2.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LINK</title>
+<link charset="Latin-1" target="dynamic" href="./files/glossary.html" hreflang="en" media="screen" rel="Glossary" type="text/html"/>
+<link charset="Latin-1" href="./files/style1.css" hreflang="en" media="screen" rev="stylesheet" type="text/css"/>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/link2.xml b/dom/tests/mochitest/dom-level2-html/files/link2.xml
new file mode 100644
index 0000000000..95c80048f2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/link2.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - LINK</title>
+<link charset="Latin-1" target="dynamic" href="./files/glossary.html" hreflang="en" media="screen" rel="Glossary" type="text/html"/>
+<link charset="Latin-1" href="./files/style1.css" hreflang="en" media="screen" rev="stylesheet" type="text/css"/>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/map.html b/dom/tests/mochitest/dom-level2-html/files/map.html
new file mode 100644
index 0000000000..a636fa5899
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/map.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - MAP</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<MAP NAME="mapid" ID="mapid">
+<AREA HREF="./files/dletter1.html" TITLE="Domain1" ALT="Domain1">
+<AREA HREF="./files/dletter2.html" TITLE="Domain2" ALT="Domain2">
+<AREA HREF="./files/dletter3.html" TITLE="Domain3" ALT="Domain3">
+</MAP>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/map.xhtml b/dom/tests/mochitest/dom-level2-html/files/map.xhtml
new file mode 100644
index 0000000000..f61a2adb9a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/map.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MAP</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter1.html" title="Domain1" alt="Domain1"/>
+<area href="./files/dletter2.html" title="Domain2" alt="Domain2"/>
+<area href="./files/dletter3.html" title="Domain3" alt="Domain3"/>
+</map>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/map.xml b/dom/tests/mochitest/dom-level2-html/files/map.xml
new file mode 100644
index 0000000000..f61a2adb9a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/map.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MAP</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<map name="mapid" id="mapid">
+<area href="./files/dletter1.html" title="Domain1" alt="Domain1"/>
+<area href="./files/dletter2.html" title="Domain2" alt="Domain2"/>
+<area href="./files/dletter3.html" title="Domain3" alt="Domain3"/>
+</map>
+</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/files/menu.html b/dom/tests/mochitest/dom-level2-html/files/menu.html
new file mode 100644
index 0000000000..e07204f1dc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/menu.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - MENU</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<MENU COMPACT="COMPACT">
+<LI>Interview</LI>
+<LI>Paperwork</LI>
+<LI>Give start date</LI>
+</MENU>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/menu.xhtml b/dom/tests/mochitest/dom-level2-html/files/menu.xhtml
new file mode 100644
index 0000000000..9f020ff8b9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/menu.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MENU</title>
+</head>
+<body onload="parent.loadComplete()">
+<menu compact="compact">
+<li>Interview</li>
+<li>Paperwork</li>
+<li>Give start date</li>
+</menu>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/menu.xml b/dom/tests/mochitest/dom-level2-html/files/menu.xml
new file mode 100644
index 0000000000..9f020ff8b9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/menu.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MENU</title>
+</head>
+<body onload="parent.loadComplete()">
+<menu compact="compact">
+<li>Interview</li>
+<li>Paperwork</li>
+<li>Give start date</li>
+</menu>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/meta.html b/dom/tests/mochitest/dom-level2-html/files/meta.html
new file mode 100644
index 0000000000..e88fe8fc1d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/meta.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META NAME="Meta-Name" HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" SCHEME="NIST">
+<TITLE>NIST DOM HTML Test - META</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<BR/>
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/meta.xhtml b/dom/tests/mochitest/dom-level2-html/files/meta.xhtml
new file mode 100644
index 0000000000..bf89bbeeab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/meta.xhtml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<meta name="Meta-Name" http-equiv="Content-Type" content="text/html; CHARSET=utf-8" scheme="NIST"/>
+<title>NIST DOM HTML Test - META</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/meta.xml b/dom/tests/mochitest/dom-level2-html/files/meta.xml
new file mode 100644
index 0000000000..bf89bbeeab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/meta.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<meta name="Meta-Name" http-equiv="Content-Type" content="text/html; CHARSET=utf-8" scheme="NIST"/>
+<title>NIST DOM HTML Test - META</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/mod.html b/dom/tests/mochitest/dom-level2-html/files/mod.html
new file mode 100644
index 0000000000..1ab79696de
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/mod.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - MOD</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<INS CITE="./files/ins-reasons.html" DATETIME="January 1, 2002">The INS element is used to indicate that a section of a document had been inserted.</INS>
+<BR/>
+<DEL CITE="./files/del-reasons.html" DATETIME="January 2, 2002">The DEL element is used to indicate that a section of a document had been removed.</DEL>
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/mod.xhtml b/dom/tests/mochitest/dom-level2-html/files/mod.xhtml
new file mode 100644
index 0000000000..b81432d52f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/mod.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MOD</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<ins cite="./files/ins-reasons.html" datetime="January 1, 2002">The INS element is used to indicate that a section of a document had been inserted.</ins>
+<br/>
+<del cite="./files/del-reasons.html" datetime="January 2, 2002">The DEL element is used to indicate that a section of a document had been removed.</del>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/mod.xml b/dom/tests/mochitest/dom-level2-html/files/mod.xml
new file mode 100644
index 0000000000..b81432d52f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/mod.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - MOD</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<ins cite="./files/ins-reasons.html" datetime="January 1, 2002">The INS element is used to indicate that a section of a document had been inserted.</ins>
+<br/>
+<del cite="./files/del-reasons.html" datetime="January 2, 2002">The DEL element is used to indicate that a section of a document had been removed.</del>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/object.html b/dom/tests/mochitest/dom-level2-html/files/object.html
new file mode 100644
index 0000000000..31da31cdc8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OBJECT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<OBJECT ALIGN="middle" ARCHIVE="" BORDER="0" CODEBASE="http://example.org:80" DATA="./pix/logo.gif" HEIGHT="60" HSPACE="0" STANDBY="Loading Image ..." TABINDEX="0" TYPE="image/gif" USEMAP="#DivLogo-map" VSPACE="0" WIDTH="550"></OBJECT>
+</P>
+<FORM NAME="OBJECT2" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<OBJECT DECLARE="declare" NAME="OBJECT2" CODETYPE="image/gif"></OBJECT>
+</P>
+</FORM>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/object.xhtml b/dom/tests/mochitest/dom-level2-html/files/object.xhtml
new file mode 100644
index 0000000000..824f7fc60e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OBJECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object align="middle" archive="" border="0" codebase="http://xw2k.sdct.itl.nist.gov/brady/dom/" data="./pix/logo.gif" height="60" hspace="0" standby="Loading Image ..." tabindex="0" type="image/gif" usemap="#DivLogo-map" vspace="0" width="550"></object>
+</p>
+<form name="OBJECT2" action="./files/getData.pl" method="post">
+<p>
+<object declare="declare" name="OBJECT2" codetype="image/gif"></object>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/object.xml b/dom/tests/mochitest/dom-level2-html/files/object.xml
new file mode 100644
index 0000000000..824f7fc60e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OBJECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object align="middle" archive="" border="0" codebase="http://xw2k.sdct.itl.nist.gov/brady/dom/" data="./pix/logo.gif" height="60" hspace="0" standby="Loading Image ..." tabindex="0" type="image/gif" usemap="#DivLogo-map" vspace="0" width="550"></object>
+</p>
+<form name="OBJECT2" action="./files/getData.pl" method="post">
+<p>
+<object declare="declare" name="OBJECT2" codetype="image/gif"></object>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/object2.html b/dom/tests/mochitest/dom-level2-html/files/object2.html
new file mode 100644
index 0000000000..44680cd726
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OBJECT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<OBJECT ALIGN="middle" ARCHIVE="" BORDER="0" CODEBASE="http://example.org:80" DATA="./pix/logo.gif" HEIGHT="60" HSPACE="0" STANDBY="Loading Image ..." TABINDEX="0" TYPE="image/gif" USEMAP="#DivLogo-map" VSPACE="0" WIDTH="550"></OBJECT>
+</P>
+<FORM ID="object2" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<OBJECT DECLARE="declare" NAME="OBJECT2" CODETYPE="image/gif"></OBJECT>
+</P>
+</FORM>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/object2.xhtml b/dom/tests/mochitest/dom-level2-html/files/object2.xhtml
new file mode 100644
index 0000000000..a41e03dd8f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object2.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OBJECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object align="middle" archive="" border="0" codebase="http://xw2k.sdct.itl.nist.gov/brady/dom/" data="./pix/logo.gif" height="60" hspace="0" standby="Loading Image ..." tabindex="0" type="image/gif" usemap="#DivLogo-map" vspace="0" width="550"></object>
+</p>
+<form id="object2" action="./files/getData.pl" method="post">
+<p>
+<object declare="declare" name="OBJECT2" codetype="image/gif"></object>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/object2.xml b/dom/tests/mochitest/dom-level2-html/files/object2.xml
new file mode 100644
index 0000000000..a41e03dd8f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/object2.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OBJECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object align="middle" archive="" border="0" codebase="http://xw2k.sdct.itl.nist.gov/brady/dom/" data="./pix/logo.gif" height="60" hspace="0" standby="Loading Image ..." tabindex="0" type="image/gif" usemap="#DivLogo-map" vspace="0" width="550"></object>
+</p>
+<form id="object2" action="./files/getData.pl" method="post">
+<p>
+<object declare="declare" name="OBJECT2" codetype="image/gif"></object>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/olist.html b/dom/tests/mochitest/dom-level2-html/files/olist.html
new file mode 100644
index 0000000000..f69c9ded98
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/olist.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OLIST</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<OL COMPACT="compact" START="1" TYPE="1">
+<LI>EMP0001
+<UL>
+<LI>Margaret Martin
+<DL>
+<DD>Accountant</DD>
+<DD>56,000</DD>
+</DL>
+</LI>
+</UL>
+</LI>
+<LI>EMP0002
+<UL>
+<LI>Martha Raynolds
+<DL>
+<DD>Secretary</DD>
+<DD>35,000</DD>
+</DL>
+</LI>
+</UL>
+</LI>
+</OL>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/olist.xhtml b/dom/tests/mochitest/dom-level2-html/files/olist.xhtml
new file mode 100644
index 0000000000..cbe1ab6add
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/olist.xhtml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OLIST</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol compact="compact" start="1" type="1">
+<li>EMP0001
+<ul>
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+</dl>
+</li>
+</ul>
+</li>
+<li>EMP0002
+<ul>
+<li>Martha Raynolds
+<dl>
+<dd>Secretary</dd>
+<dd>35,000</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/olist.xml b/dom/tests/mochitest/dom-level2-html/files/olist.xml
new file mode 100644
index 0000000000..cbe1ab6add
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/olist.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OLIST</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol compact="compact" start="1" type="1">
+<li>EMP0001
+<ul>
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+</dl>
+</li>
+</ul>
+</li>
+<li>EMP0002
+<ul>
+<li>Martha Raynolds
+<dl>
+<dd>Secretary</dd>
+<dd>35,000</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optgroup.html b/dom/tests/mochitest/dom-level2-html/files/optgroup.html
new file mode 100644
index 0000000000..a354af8066
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optgroup.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OPTGROUP</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="Form1" ACTION="test.pl" METHOD="post">
+<P>
+<SELECT NAME="select2">
+<OPTGROUP LABEL="Regular Employees">
+<OPTION>EMP0001</OPTION>
+<OPTION>EMP0002</OPTION>
+<OPTION>EMP0003A</OPTION>
+</OPTGROUP>
+<OPTGROUP DISABLED="disabled" LABEL="Temporary Employees">
+<OPTION>EMP0004</OPTION>
+<OPTION>EMP0005</OPTION>
+</OPTGROUP>
+</SELECT>
+</P>
+</FORM>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optgroup.xhtml b/dom/tests/mochitest/dom-level2-html/files/optgroup.xhtml
new file mode 100644
index 0000000000..b421ecabb3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optgroup.xhtml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTGROUP</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="Form1" action="test.pl" method="post">
+<p>
+<select name="select2">
+<optgroup label="Regular Employees">
+<option>EMP0001</option>
+<option>EMP0002</option>
+<option>EMP0003A</option>
+</optgroup>
+<optgroup disabled="disabled" label="Temporary Employees">
+<option>EMP0004</option>
+<option>EMP0005</option>
+</optgroup>
+</select>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optgroup.xml b/dom/tests/mochitest/dom-level2-html/files/optgroup.xml
new file mode 100644
index 0000000000..b421ecabb3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optgroup.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTGROUP</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="Form1" action="test.pl" method="post">
+<p>
+<select name="select2">
+<optgroup label="Regular Employees">
+<option>EMP0001</option>
+<option>EMP0002</option>
+<option>EMP0003A</option>
+</optgroup>
+<optgroup disabled="disabled" label="Temporary Employees">
+<option>EMP0004</option>
+<option>EMP0005</option>
+</optgroup>
+</select>
+</p>
+</form>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/option.html b/dom/tests/mochitest/dom-level2-html/files/option.html
new file mode 100644
index 0000000000..83707c3929
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/option.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OPTION</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" NAME="form1" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<SELECT ID="selectId" DIR="ltr" TABINDEX="7" NAME="select1" MULTIPLE="multiple" SIZE="1">
+<OPTION SELECTED="selected" value="10001">EMP10001</OPTION>
+<OPTION LABEL="l1">EMP10002</OPTION>
+<OPTION>EMP10003</OPTION>
+<OPTION>EMP10004</OPTION>
+<OPTION>EMP10005</OPTION>
+</SELECT>
+</P>
+</FORM>
+<P>
+<SELECT NAME="select2" disabled="disabled">
+<OPTION>EMP20001</OPTION>
+<OPTION>EMP20002</OPTION>
+<OPTION>EMP20003</OPTION>
+<OPTION>EMP20004</OPTION>
+<OPTION DISABLED="disabled">EMP20005</OPTION>
+</SELECT>
+</P>
+</BODY>
+</HTML>
+
+
+
+
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/option.xhtml b/dom/tests/mochitest/dom-level2-html/files/option.xhtml
new file mode 100644
index 0000000000..8cf88d8878
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/option.xhtml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="10001">EMP10001</option>
+<option label="l1">EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2" disabled="disabled">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option disabled="disabled">EMP20005</option>
+</select>
+</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/option.xml b/dom/tests/mochitest/dom-level2-html/files/option.xml
new file mode 100644
index 0000000000..8cf88d8878
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/option.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="10001">EMP10001</option>
+<option label="l1">EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2" disabled="disabled">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option disabled="disabled">EMP20005</option>
+</select>
+</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optionscollection.html b/dom/tests/mochitest/dom-level2-html/files/optionscollection.html
new file mode 100644
index 0000000000..d1e8743eae
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optionscollection.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - OPTIONSCOLLECTION</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" NAME="form1" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<SELECT ID="selectId" DIR="ltr" TABINDEX="7" NAME="select1" MULTIPLE="multiple" SIZE="1">
+<OPTION SELECTED="selected" value="10001">EMP10001</OPTION>
+<OPTION LABEL="l1">EMP10002</OPTION>
+<OPTION>EMP10003</OPTION>
+<OPTION>EMP10004</OPTION>
+<OPTION>EMP10005</OPTION>
+</SELECT>
+</P>
+</FORM>
+<P>
+<SELECT NAME="select2" disabled="disabled">
+<OPTION>EMP20001</OPTION>
+<OPTION>EMP20002</OPTION>
+<OPTION>EMP20003</OPTION>
+<OPTION>EMP20004</OPTION>
+<OPTION DISABLED="disabled">EMP20005</OPTION>
+</SELECT>
+</P>
+</BODY>
+</HTML>
+
+
+
+
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optionscollection.xhtml b/dom/tests/mochitest/dom-level2-html/files/optionscollection.xhtml
new file mode 100644
index 0000000000..3f04194207
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optionscollection.xhtml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTIONSCOLLECTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="10001">EMP10001</option>
+<option label="l1">EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2" disabled="disabled">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option disabled="disabled">EMP20005</option>
+</select>
+</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/optionscollection.xml b/dom/tests/mochitest/dom-level2-html/files/optionscollection.xml
new file mode 100644
index 0000000000..3f04194207
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/optionscollection.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - OPTIONSCOLLECTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="10001">EMP10001</option>
+<option label="l1">EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2" disabled="disabled">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option disabled="disabled">EMP20005</option>
+</select>
+</p>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/paragraph.html b/dom/tests/mochitest/dom-level2-html/files/paragraph.html
new file mode 100644
index 0000000000..0da4836097
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/paragraph.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - PARAGRAPH</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P ALIGN="center">
+TEXT
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/paragraph.xhtml b/dom/tests/mochitest/dom-level2-html/files/paragraph.xhtml
new file mode 100644
index 0000000000..2cdb1dfe15
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/paragraph.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PARAGRAPH</title>
+</head>
+<body onload="parent.loadComplete()">
+<p align="center">
+TEXT
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/paragraph.xml b/dom/tests/mochitest/dom-level2-html/files/paragraph.xml
new file mode 100644
index 0000000000..2cdb1dfe15
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/paragraph.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PARAGRAPH</title>
+</head>
+<body onload="parent.loadComplete()">
+<p align="center">
+TEXT
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/param.html b/dom/tests/mochitest/dom-level2-html/files/param.html
new file mode 100644
index 0000000000..290e626601
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/param.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - PARAM</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<OBJECT>
+<PARAM NAME="image3" TYPE="image/gif" VALUE="image/file.gif" VALUETYPE="ref">
+</OBJECT>
+</P>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/param.xhtml b/dom/tests/mochitest/dom-level2-html/files/param.xhtml
new file mode 100644
index 0000000000..3e916eb5a2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/param.xhtml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PARAM</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object>
+<param name="image3" type="image/gif" value="image/file.gif" valuetype="ref"/>
+</object>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/param.xml b/dom/tests/mochitest/dom-level2-html/files/param.xml
new file mode 100644
index 0000000000..3e916eb5a2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/param.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PARAM</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<object>
+<param name="image3" type="image/gif" value="image/file.gif" valuetype="ref"/>
+</object>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/pre.html b/dom/tests/mochitest/dom-level2-html/files/pre.html
new file mode 100644
index 0000000000..2a402065e4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/pre.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - PRE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<PRE WIDTH="277">The PRE is used to indicate pre-formatted text. Visual agents may:
+
+ leave white space intact.
+ May render text with a fixed-pitch font.
+ May disable automatic word wrap.
+ Must not disable bidirectional processing.
+</PRE>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/pre.xhtml b/dom/tests/mochitest/dom-level2-html/files/pre.xhtml
new file mode 100644
index 0000000000..69f652b14f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/pre.xhtml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PRE</title>
+</head>
+<body onload="parent.loadComplete()">
+<pre>The PRE is used to indicate pre-formatted text. Visual agents may:
+
+ leave white space intact.
+ May render text with a fixed-pitch font.
+ May disable automatic word wrap.
+ Must not disable bidirectional processing.
+</pre>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/pre.xml b/dom/tests/mochitest/dom-level2-html/files/pre.xml
new file mode 100644
index 0000000000..69f652b14f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/pre.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - PRE</title>
+</head>
+<body onload="parent.loadComplete()">
+<pre>The PRE is used to indicate pre-formatted text. Visual agents may:
+
+ leave white space intact.
+ May render text with a fixed-pitch font.
+ May disable automatic word wrap.
+ Must not disable bidirectional processing.
+</pre>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/quote.html b/dom/tests/mochitest/dom-level2-html/files/quote.html
new file mode 100644
index 0000000000..6bad2b83f6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/quote.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - QUOTE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<Q CITE="./files/Q.html">The Q element is intended for short quotations</Q>
+</P>
+<BLOCKQUOTE CITE="./files/BLOCKQUOTE.html">
+<P>The BLOCKQUOTE element is used for long quotations.</P>
+</BLOCKQUOTE>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/quote.xhtml b/dom/tests/mochitest/dom-level2-html/files/quote.xhtml
new file mode 100644
index 0000000000..93e6c422f9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/quote.xhtml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - QUOTE</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<q cite="./files/Q.html">The Q element is intended for short quotations</q>
+</p>
+<blockquote cite="./files/BLOCKQUOTE.html">
+<p>The BLOCKQUOTE element is used for long quotations.</p>
+</blockquote>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/quote.xml b/dom/tests/mochitest/dom-level2-html/files/quote.xml
new file mode 100644
index 0000000000..93e6c422f9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/quote.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - QUOTE</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<q cite="./files/Q.html">The Q element is intended for short quotations</q>
+</p>
+<blockquote cite="./files/BLOCKQUOTE.html">
+<p>The BLOCKQUOTE element is used for long quotations.</p>
+</blockquote>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/right.png b/dom/tests/mochitest/dom-level2-html/files/right.png
new file mode 100644
index 0000000000..41ad0bdad2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/right.png
Binary files differ
diff --git a/dom/tests/mochitest/dom-level2-html/files/script.html b/dom/tests/mochitest/dom-level2-html/files/script.html
new file mode 100644
index 0000000000..362860b393
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/script.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - SCRIPT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<SCRIPT CHARSET="US-ASCII" TYPE="text/javaScript" DEFER="defer" SRC="./files/script1.js">var a=2;</SCRIPT>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/script.xhtml b/dom/tests/mochitest/dom-level2-html/files/script.xhtml
new file mode 100644
index 0000000000..ebdaa7246f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/script.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - SCRIPT</title>
+</head>
+<body onload="parent.loadComplete()">
+<script charset="US-ASCII" type="text/javaScript" defer="defer" src="./files/script1.js">var a=2;</script>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/script.xml b/dom/tests/mochitest/dom-level2-html/files/script.xml
new file mode 100644
index 0000000000..ebdaa7246f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/script.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - SCRIPT</title>
+</head>
+<body onload="parent.loadComplete()">
+<script charset="US-ASCII" type="text/javaScript" defer="defer" src="./files/script1.js">var a=2;</script>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/select.html b/dom/tests/mochitest/dom-level2-html/files/select.html
new file mode 100644
index 0000000000..78206240f0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/select.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - SELECT</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<SELECT ID="selectId" DIR="ltr" TABINDEX="7" NAME="select1" MULTIPLE="multiple" SIZE="1">
+<OPTION SELECTED="selected" value="EMP1">EMP10001</OPTION>
+<OPTION>EMP10002</OPTION>
+<OPTION>EMP10003</OPTION>
+<OPTION>EMP10004</OPTION>
+<OPTION>EMP10005</OPTION>
+</SELECT>
+</P>
+</FORM>
+<P>
+<SELECT NAME="select2">
+<OPTION>EMP20001</OPTION>
+<OPTION>EMP20002</OPTION>
+<OPTION>EMP20003</OPTION>
+<OPTION>EMP20004</OPTION>
+<OPTION>EMP20005</OPTION>
+</SELECT>
+</P>
+<P>
+<SELECT NAME="select3" DISABLED="disabled" TABINDEX="1">
+<OPTION>EMP30001</OPTION>
+<OPTION>EMP30002</OPTION>
+<OPTION>EMP30003</OPTION>
+<OPTION>EMP30004</OPTION>
+<OPTION>EMP30005</OPTION>
+</SELECT>
+</P>
+</BODY>
+</HTML>
+
+
+
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/select.xhtml b/dom/tests/mochitest/dom-level2-html/files/select.xhtml
new file mode 100644
index 0000000000..491a74c6ac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/select.xhtml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - SELECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="EMP1">EMP10001</option>
+<option>EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option>EMP20005</option>
+</select>
+</p>
+<p>
+<select name="select3" disabled="disabled" tabindex="1">
+<option>EMP30001</option>
+<option>EMP30002</option>
+<option>EMP30003</option>
+<option>EMP30004</option>
+<option>EMP30005</option>
+</select>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/select.xml b/dom/tests/mochitest/dom-level2-html/files/select.xml
new file mode 100644
index 0000000000..491a74c6ac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/select.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - SELECT</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<select id="selectId" dir="ltr" tabindex="7" name="select1" multiple="multiple" size="1">
+<option selected="selected" value="EMP1">EMP10001</option>
+<option>EMP10002</option>
+<option>EMP10003</option>
+<option>EMP10004</option>
+<option>EMP10005</option>
+</select>
+</p>
+</form>
+<p>
+<select name="select2">
+<option>EMP20001</option>
+<option>EMP20002</option>
+<option>EMP20003</option>
+<option>EMP20004</option>
+<option>EMP20005</option>
+</select>
+</p>
+<p>
+<select name="select3" disabled="disabled" tabindex="1">
+<option>EMP30001</option>
+<option>EMP30002</option>
+<option>EMP30003</option>
+<option>EMP30004</option>
+<option>EMP30005</option>
+</select>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/style.html b/dom/tests/mochitest/dom-level2-html/files/style.html
new file mode 100644
index 0000000000..c3df42432d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/style.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<STYLE MEDIA="screen" type="text/css"></STYLE>
+<TITLE>NIST DOM HTML Test - STYLE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>Hello, World.</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/style.xhtml b/dom/tests/mochitest/dom-level2-html/files/style.xhtml
new file mode 100644
index 0000000000..b8477c1f6d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/style.xhtml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<style media="screen" type="text/css"></style>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Hello, World.</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/style.xml b/dom/tests/mochitest/dom-level2-html/files/style.xml
new file mode 100644
index 0000000000..b8477c1f6d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/style.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<style media="screen" type="text/css"></style>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>Hello, World.</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/table.html b/dom/tests/mochitest/dom-level2-html/files/table.html
new file mode 100644
index 0000000000..b8f151e069
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table.html
@@ -0,0 +1,78 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE ALIGN="center" SUMMARY="Table 1">
+<TR>
+<TH>Id</TH>
+<TH>Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+</TABLE>
+<TABLE ID="table-1" ALIGN="center" BORDER="4" BGCOLOR="#ff0000" FRAME="border" CELLPADDING="2" CELLSPACING="2" SUMMARY="HTML Control Table" RULES="all" WIDTH="680">
+<CAPTION ALIGN="top">Table Caption</CAPTION>
+<THEAD ALIGN="center" VALIGN="middle">
+<TR ALIGN="center" BGCOLOR="#00FFFF" VALIGN="middle">
+<TH ID="header-1">Employee Id</TH>
+<TH ID="header-2" ABBR="maiden" AXIS="center" ALIGN="center" BGCOLOR="#00FFFF" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-1" VALIGN="middle" WIDTH="100">Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+<TH>Gender</TH>
+<TH>Address</TH>
+</TR>
+</THEAD>
+<TFOOT ALIGN="center" VALIGN="middle">
+<TR>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+</TR>
+</TFOOT>
+<TBODY ALIGN="center" VALIGN="middle">
+<TR>
+<TD AXIS="center" ID="Table-3" ABBR="maiden2" ALIGN="center" BGCOLOR="#FF0000" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-2" VALIGN="middle" WIDTH="175">EMP0001</TD>
+<TD HEADERS="header-2">Margaret Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+<TD>Female</TD>
+<TD>1230 North Ave. Dallas, Texas 98551</TD>
+</TR>
+<TR>
+<TD>EMP0002</TD>
+<TD>Martha Raynolds</TD>
+<TD>Secretary</TD>
+<TD>35,000</TD>
+<TD>Female</TD>
+<TD>1900 Dallas Road Dallas, Texas 98554</TD>
+</TR>
+</TBODY>
+</TABLE>
+<TABLE SUMMARY="Table 3">
+<TBODY>
+<TR>
+<TD>
+</TD>
+</TR>
+</TBODY>
+<TBODY>
+<TR>
+<TD>
+</TD>
+</TR>
+</TBODY>
+<TBODY>
+<TR>
+<TD>
+</TD>
+</TR>
+</TBODY>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/table.xhtml b/dom/tests/mochitest/dom-level2-html/files/table.xhtml
new file mode 100644
index 0000000000..8300b90a17
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table.xhtml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" bgcolor="#00FFFF" valign="middle">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+<table summary="Table 3">
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/table.xml b/dom/tests/mochitest/dom-level2-html/files/table.xml
new file mode 100644
index 0000000000..8300b90a17
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" bgcolor="#00FFFF" valign="middle">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+<table summary="Table 3">
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+<tbody>
+<tr>
+<td>
+</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/table1.html b/dom/tests/mochitest/dom-level2-html/files/table1.html
new file mode 100644
index 0000000000..8f5d19b282
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table1.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE SUMMARY="Empty Table">
+<tr><td>HTML can't abide empty table</td></tr>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/table1.xhtml b/dom/tests/mochitest/dom-level2-html/files/table1.xhtml
new file mode 100644
index 0000000000..e174c63dfd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table1.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Empty Table">
+<tr><td>XHTML can't abide empty table</td></tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/table1.xml b/dom/tests/mochitest/dom-level2-html/files/table1.xml
new file mode 100644
index 0000000000..e174c63dfd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/table1.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Empty Table">
+<tr><td>XHTML can't abide empty table</td></tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecaption.html b/dom/tests/mochitest/dom-level2-html/files/tablecaption.html
new file mode 100644
index 0000000000..f9181c739c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecaption.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLECAPTION</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE SUMMARY="Table Summary">
+<CAPTION ALIGN="top">CAPTION 1</CAPTION>
+<TR>
+<TH>Employee Id</TH>
+<TH>Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
+
+
+
+
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecaption.xhtml b/dom/tests/mochitest/dom-level2-html/files/tablecaption.xhtml
new file mode 100644
index 0000000000..67b72dcc36
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecaption.xhtml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<caption align="top">CAPTION 1</caption>
+<tr>
+<th>Employee Id</th>
+<th>Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecaption.xml b/dom/tests/mochitest/dom-level2-html/files/tablecaption.xml
new file mode 100644
index 0000000000..67b72dcc36
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecaption.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - BR</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<caption align="top">CAPTION 1</caption>
+<tr>
+<th>Employee Id</th>
+<th>Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecell.html b/dom/tests/mochitest/dom-level2-html/files/tablecell.html
new file mode 100644
index 0000000000..c9adef2a41
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecell.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLECELL</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE SUMMARY="Table Summary">
+<TR>
+<TH ID="header-1">Employee Id</TH>
+<TH ID="header-2" ABBR="hd1" AXIS="center" ALIGN="center" BGCOLOR="#00FFFF" CHAR=":" CHAROFF="1" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-1" VALIGN="middle" WIDTH="170">Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+<TR>
+<TD ID="header-3">EMP0001</TD>
+<TD ID="header-4" ABBR="hd2" AXIS="center" ALIGN="center" BGCOLOR="#FF0000" CHAR=":" CHAROFF="1" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-3" VALIGN="middle" WIDTH="175">Margaret Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecell.xhtml b/dom/tests/mochitest/dom-level2-html/files/tablecell.xhtml
new file mode 100644
index 0000000000..0e8ee7f0dd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecell.xhtml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLECELL</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<tr>
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="hd1" axis="center" align="center" bgcolor="#00FFFF" char=":" charoff="1" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="170">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+<tr>
+<td id="header-3">EMP0001</td>
+<td id="header-4" abbr="hd2" axis="center" align="center" bgcolor="#FF0000" char=":" charoff="1" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-3" valign="middle" width="175">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecell.xml b/dom/tests/mochitest/dom-level2-html/files/tablecell.xml
new file mode 100644
index 0000000000..0e8ee7f0dd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecell.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLECELL</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<tr>
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="hd1" axis="center" align="center" bgcolor="#00FFFF" char=":" charoff="1" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="170">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+<tr>
+<td id="header-3">EMP0001</td>
+<td id="header-4" abbr="hd2" axis="center" align="center" bgcolor="#FF0000" char=":" charoff="1" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-3" valign="middle" width="175">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecol.html b/dom/tests/mochitest/dom-level2-html/files/tablecol.html
new file mode 100644
index 0000000000..c72a948990
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecol.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLECOL</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE SUMMARY="Table Summary">
+<COLGROUP VALIGN="middle" SPAN="2" ALIGN="center" WIDTH="20" CHAR="$" CHAROFF="15">
+<COL VALIGN="middle" SPAN="1" ALIGN="center" WIDTH="20" CHAR="*" CHAROFF="20">
+</COLGROUP>
+<TR>
+<TH>Id</TH>
+<TH>Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+<TR>
+<TD>EMP0001</TD>
+<TD>Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecol.xhtml b/dom/tests/mochitest/dom-level2-html/files/tablecol.xhtml
new file mode 100644
index 0000000000..a69c4fec46
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecol.xhtml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLECOL</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<colgroup valign="middle" span="2" align="center" width="20" char="$" charoff="15">
+<col valign="middle" span="1" align="center" width="20" char="*" charoff="20"/>
+</colgroup>
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+<tr>
+<td>EMP0001</td>
+<td>Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablecol.xml b/dom/tests/mochitest/dom-level2-html/files/tablecol.xml
new file mode 100644
index 0000000000..a69c4fec46
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablecol.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLECOL</title>
+</head>
+<body onload="parent.loadComplete()">
+<table summary="Table 1">
+<colgroup valign="middle" span="2" align="center" width="20" char="$" charoff="15">
+<col valign="middle" span="1" align="center" width="20" char="*" charoff="20"/>
+</colgroup>
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+<tr>
+<td>EMP0001</td>
+<td>Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+</tr>
+</table>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablerow.html b/dom/tests/mochitest/dom-level2-html/files/tablerow.html
new file mode 100644
index 0000000000..9e76a4cdb5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablerow.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLEROW</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE ALIGN="center" SUMMARY="Table 1">
+<TR>
+<TH>Id</TH>
+<TH>Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+</TABLE>
+<TABLE ID="table-1" ALIGN="center" BORDER="4" BGCOLOR="#ff0000" FRAME="border" CELLPADDING="2" CELLSPACING="2" SUMMARY="HTML Control Table" RULES="all" WIDTH="680">
+<CAPTION ALIGN="top">Table Caption</CAPTION>
+<THEAD ALIGN="center" VALIGN="middle">
+<TR ALIGN="center" BGCOLOR="#00FFFF" VALIGN="middle" CHAR="*" CHAROFF="1">
+<TH ID="header-1">Employee Id</TH>
+<TH ID="header-2" ABBR="maiden" AXIS="center" ALIGN="center" BGCOLOR="#00FFFF" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-1" VALIGN="middle" WIDTH="100">Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+<TH>Gender</TH>
+<TH>Address</TH>
+</TR>
+</THEAD>
+<TFOOT ALIGN="center" VALIGN="middle">
+<TR>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+</TR>
+</TFOOT>
+<TBODY ALIGN="center" VALIGN="middle">
+<TR>
+<TD AXIS="center" ID="Table-3" ABBR="maiden2" ALIGN="center" BGCOLOR="#FF0000" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-2" VALIGN="middle" WIDTH="175">EMP0001</TD>
+<TD HEADERS="header-2">Margaret Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+<TD>Female</TD>
+<TD>1230 North Ave. Dallas, Texas 98551</TD>
+</TR>
+<TR>
+<TD>EMP0002</TD>
+<TD>Martha Raynolds</TD>
+<TD>Secretary</TD>
+<TD>35,000</TD>
+<TD>Female</TD>
+<TD>1900 Dallas Road Dallas, Texas 98554</TD>
+</TR>
+</TBODY>
+</TABLE>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablerow.xhtml b/dom/tests/mochitest/dom-level2-html/files/tablerow.xhtml
new file mode 100644
index 0000000000..b901e3ce0e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablerow.xhtml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" bgcolor="#00FFFF" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablerow.xml b/dom/tests/mochitest/dom-level2-html/files/tablerow.xml
new file mode 100644
index 0000000000..b901e3ce0e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablerow.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle">
+<tr align="center" bgcolor="#00FFFF" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablesection.html b/dom/tests/mochitest/dom-level2-html/files/tablesection.html
new file mode 100644
index 0000000000..0c1a5f784d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablesection.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TABLESECTION</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<TABLE ALIGN="center" SUMMARY="Table 1">
+<TBODY>
+<TR>
+<TH>Id</TH>
+<TH>Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+</TR>
+</TBODY>
+</TABLE>
+<TABLE ID="table-1" ALIGN="center" BORDER="4" BGCOLOR="#ff0000" FRAME="border" CELLPADDING="2" CELLSPACING="2" SUMMARY="HTML Control Table" RULES="all" WIDTH="680">
+<CAPTION ALIGN="top">Table Caption</CAPTION>
+<THEAD ALIGN="center" VALIGN="middle" CHAR="*" CHAROFF="1">
+<TR ALIGN="center" BGCOLOR="#00FFFF" VALIGN="middle" CHAR="*" CHAROFF="1">
+<TH ID="header-1">Employee Id</TH>
+<TH ID="header-2" ABBR="maiden" AXIS="center" ALIGN="center" BGCOLOR="#00FFFF" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-1" VALIGN="middle" WIDTH="100">Employee Name</TH>
+<TH>Position</TH>
+<TH>Salary</TH>
+<TH>Gender</TH>
+<TH>Address</TH>
+</TR>
+</THEAD>
+<TFOOT ALIGN="center" VALIGN="middle" CHAR="+" CHAROFF="2">
+<TR>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+<TH>next page ...</TH>
+</TR>
+</TFOOT>
+<TBODY ALIGN="center" VALIGN="middle" CHAR="$" CHAROFF="3">
+<TR>
+<TD AXIS="center" ID="Table-3" ABBR="maiden2" ALIGN="center" BGCOLOR="#FF0000" COLSPAN="1" HEIGHT="50" NOWRAP="nowrap" ROWSPAN="1" SCOPE="col" HEADERS="header-2" VALIGN="middle" WIDTH="175">EMP0001</TD>
+<TD HEADERS="header-2">Margaret Martin</TD>
+<TD>Accountant</TD>
+<TD>56,000</TD>
+<TD>Female</TD>
+<TD>1230 North Ave. Dallas, Texas 98551</TD>
+</TR>
+<TR>
+<TD>EMP0002</TD>
+<TD>Martha Raynolds</TD>
+<TD>Secretary</TD>
+<TD>35,000</TD>
+<TD>Female</TD>
+<TD>1900 Dallas Road Dallas, Texas 98554</TD>
+</TR>
+</TBODY>
+</TABLE>
+</BODY>
+</HTML>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablesection.xhtml b/dom/tests/mochitest/dom-level2-html/files/tablesection.xhtml
new file mode 100644
index 0000000000..34986508bc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablesection.xhtml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLESECTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tbody>
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</tbody>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle" char="*" charoff="1">
+<tr align="center" bgcolor="#00FFFF" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle" char="+" charoff="2">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle" char="$" charoff="3">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/tablesection.xml b/dom/tests/mochitest/dom-level2-html/files/tablesection.xml
new file mode 100644
index 0000000000..34986508bc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/tablesection.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TABLESECTION</title>
+</head>
+<body onload="parent.loadComplete()">
+<table align="center" summary="Table 1">
+<tbody>
+<tr>
+<th>Id</th>
+<th>Name</th>
+<th>Position</th>
+<th>Salary</th>
+</tr>
+</tbody>
+</table>
+<table id="table-1" align="center" border="4" bgcolor="#ff0000" frame="border" cellpadding="2" cellspacing="2" summary="HTML Control Table" rules="all" width="680">
+<caption align="top">Table Caption</caption>
+<thead align="center" valign="middle" char="*" charoff="1">
+<tr align="center" bgcolor="#00FFFF" valign="middle" char="*" charoff="1">
+<th id="header-1">Employee Id</th>
+<th id="header-2" abbr="maiden" axis="center" align="center" bgcolor="#00FFFF" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-1" valign="middle" width="100">Employee Name</th>
+<th>Position</th>
+<th>Salary</th>
+<th>Gender</th>
+<th>Address</th>
+</tr>
+</thead>
+<tfoot align="center" valign="middle" char="+" charoff="2">
+<tr>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+<th>next page ...</th>
+</tr>
+</tfoot>
+<tbody align="center" valign="middle" char="$" charoff="3">
+<tr>
+<td axis="center" id="Table-3" abbr="maiden2" align="center" bgcolor="#FF0000" colspan="1" height="50" nowrap="nowrap" rowspan="1" scope="col" headers="header-2" valign="middle" width="175">EMP0001</td>
+<td headers="header-2">Margaret Martin</td>
+<td>Accountant</td>
+<td>56,000</td>
+<td>Female</td>
+<td>1230 North Ave. Dallas, Texas 98551</td>
+</tr>
+<tr>
+<td>EMP0002</td>
+<td>Martha Raynolds</td>
+<td>Secretary</td>
+<td>35,000</td>
+<td>Female</td>
+<td>1900 Dallas Road Dallas, Texas 98554</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>
+
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/textarea.html b/dom/tests/mochitest/dom-level2-html/files/textarea.html
new file mode 100644
index 0000000000..b9aedc4997
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/textarea.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TEXTAREA</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<FORM ID="form1" ACCEPT-CHARSET="US-ASCII" ACTION="./files/getData.pl" METHOD="post">
+<P>
+<TEXTAREA NAME="text1" COLS="20" ROWS="7" ACCESSKEY="c" TABINDEX="5">TEXTAREA1</TEXTAREA>
+<INPUT TYPE="submit" NAME="submit1" VALUE="Submit1"/>
+<INPUT TYPE="reset" NAME="reset1" VALUE="Reset1"/>
+</P>
+</FORM>
+<P>
+<TEXTAREA NAME="text2" COLS="50" ROWS="2" DISABLED="disabled">TEXTAREA2</TEXTAREA>
+<INPUT TYPE="submit" NAME="submit2" VALUE="Submit2"/>
+<INPUT TYPE="reset" NAME="reset2" VALUE="Reset2"/>
+<TEXTAREA NAME="text2" COLS="50" ROWS="2" READONLY="readonly">TEXTAREA3</TEXTAREA>
+<INPUT TYPE="submit" NAME="submit2" VALUE="Submit2"/>
+<INPUT TYPE="reset" NAME="reset3" VALUE="Reset3"/>
+</P>
+</BODY>
+</HTML>
+
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/textarea.xhtml b/dom/tests/mochitest/dom-level2-html/files/textarea.xhtml
new file mode 100644
index 0000000000..eb6ca48bac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/textarea.xhtml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TEXTAREA</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<textarea name="text1" cols="20" rows="7" accesskey="c" tabindex="5">TEXTAREA1</textarea>
+<input type="submit" name="submit1" value="Submit1"/>
+<input type="reset" name="reset1" value="Reset1"/>
+</p>
+</form>
+<p>
+<textarea name="text2" cols="50" rows="2" disabled="disabled">TEXTAREA2</textarea>
+<input type="submit" name="submit2" value="Submit2"/>
+<input type="reset" name="reset2" value="Reset2"/>
+<textarea name="text2" cols="50" rows="2" readonly="readonly">TEXTAREA3</textarea>
+<input type="submit" name="submit3" value="Submit3"/>
+<input type="reset" name="reset3" value="Reset3"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/textarea.xml b/dom/tests/mochitest/dom-level2-html/files/textarea.xml
new file mode 100644
index 0000000000..eb6ca48bac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/textarea.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TEXTAREA</title>
+</head>
+<body onload="parent.loadComplete()">
+<form id="form1" action="./files/getData.pl" method="post">
+<p>
+<textarea name="text1" cols="20" rows="7" accesskey="c" tabindex="5">TEXTAREA1</textarea>
+<input type="submit" name="submit1" value="Submit1"/>
+<input type="reset" name="reset1" value="Reset1"/>
+</p>
+</form>
+<p>
+<textarea name="text2" cols="50" rows="2" disabled="disabled">TEXTAREA2</textarea>
+<input type="submit" name="submit2" value="Submit2"/>
+<input type="reset" name="reset2" value="Reset2"/>
+<textarea name="text2" cols="50" rows="2" readonly="readonly">TEXTAREA3</textarea>
+<input type="submit" name="submit3" value="Submit3"/>
+<input type="reset" name="reset3" value="Reset3"/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/title.html b/dom/tests/mochitest/dom-level2-html/files/title.html
new file mode 100644
index 0000000000..2078ee95d3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/title.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - TITLE</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<P>
+<BR/>
+</P>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/title.xhtml b/dom/tests/mochitest/dom-level2-html/files/title.xhtml
new file mode 100644
index 0000000000..e8ec6b55a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/title.xhtml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TITLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/title.xml b/dom/tests/mochitest/dom-level2-html/files/title.xml
new file mode 100644
index 0000000000..e8ec6b55a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/title.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "xhtml1-strict.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - TITLE</title>
+</head>
+<body onload="parent.loadComplete()">
+<p>
+<br/>
+</p>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/ulist.html b/dom/tests/mochitest/dom-level2-html/files/ulist.html
new file mode 100644
index 0000000000..75498e2cbc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/ulist.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
+<TITLE>NIST DOM HTML Test - ULIST</TITLE>
+</HEAD>
+<BODY onload="parent.loadComplete()">
+<OL>
+<LI>EMP0001
+<UL COMPACT="compact" TYPE="disc">
+<LI>Margaret Martin
+<DL>
+<DD>Accountant</DD>
+<DD>56,000</DD>
+<DD>Female</DD>
+<DD>1230 North Ave. Dallas, Texas 98551</DD>
+</DL>
+</LI>
+</UL>
+</LI>
+<LI>EMP0002
+<UL>
+<LI>Martha Raynolds
+<DL>
+<DD>Secretary</DD>
+<DD>35,000</DD>
+<DD>Female</DD>
+<DD>1900 Dallas Road. Dallas, Texas 98554</DD>
+</DL>
+</LI>
+</UL>
+</LI>
+</OL>
+</BODY>
+</HTML>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/ulist.xhtml b/dom/tests/mochitest/dom-level2-html/files/ulist.xhtml
new file mode 100644
index 0000000000..fd9d7a5a46
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/ulist.xhtml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - ULIST</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol>
+<li>EMP0001
+<ul compact="compact" type="disc">
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+<dd>1230 North Ave. Dallas, Texas 98551</dd>
+</dl>
+</li>
+</ul>
+</li>
+<li>EMP0002
+<ul>
+<li>Martha Raynolds
+<dl>
+<dd>Secretary</dd>
+<dd>35,000</dd>
+<dd>Female</dd>
+<dd>1900 Dallas Road. Dallas, Texas 98554</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/ulist.xml b/dom/tests/mochitest/dom-level2-html/files/ulist.xml
new file mode 100644
index 0000000000..fd9d7a5a46
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/ulist.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml'>
+<head>
+<title>NIST DOM HTML Test - ULIST</title>
+</head>
+<body onload="parent.loadComplete()">
+<ol>
+<li>EMP0001
+<ul compact="compact" type="disc">
+<li>Margaret Martin
+<dl>
+<dd>Accountant</dd>
+<dd>56,000</dd>
+<dd>Female</dd>
+<dd>1230 North Ave. Dallas, Texas 98551</dd>
+</dl>
+</li>
+</ul>
+</li>
+<li>EMP0002
+<ul>
+<li>Martha Raynolds
+<dl>
+<dd>Secretary</dd>
+<dd>35,000</dd>
+<dd>Female</dd>
+<dd>1900 Dallas Road. Dallas, Texas 98554</dd>
+</dl>
+</li>
+</ul>
+</li>
+</ol>
+</body>
+</html>
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/w3c_main.png b/dom/tests/mochitest/dom-level2-html/files/w3c_main.png
new file mode 100644
index 0000000000..ac0ecd37eb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/w3c_main.png
Binary files differ
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml-lat1.ent b/dom/tests/mochitest/dom-level2-html/files/xhtml-lat1.ent
new file mode 100644
index 0000000000..ffee223eb1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+ %HTMLlat1;
+-->
+
+<!ENTITY nbsp "&#160;"> <!-- no-break space = non-breaking space,
+ U+00A0 ISOnum -->
+<!ENTITY iexcl "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+ U+00A6 ISOnum -->
+<!ENTITY sect "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml "&#168;"> <!-- diaeresis = spacing diaeresis,
+ U+00A8 ISOdia -->
+<!ENTITY copy "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo "&#171;"> <!-- left-pointing double angle quotation mark
+ = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not "&#172;"> <!-- not sign = angled dash,
+ U+00AC ISOnum -->
+<!ENTITY shy "&#173;"> <!-- soft hyphen = discretionary hyphen,
+ U+00AD ISOnum -->
+<!ENTITY reg "&#174;"> <!-- registered sign = registered trade mark sign,
+ U+00AE ISOnum -->
+<!ENTITY macr "&#175;"> <!-- macron = spacing macron = overline
+ = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+ U+00B1 ISOnum -->
+<!ENTITY sup2 "&#178;"> <!-- superscript two = superscript digit two
+ = squared, U+00B2 ISOnum -->
+<!ENTITY sup3 "&#179;"> <!-- superscript three = superscript digit three
+ = cubed, U+00B3 ISOnum -->
+<!ENTITY acute "&#180;"> <!-- acute accent = spacing acute,
+ U+00B4 ISOdia -->
+<!ENTITY micro "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para "&#182;"> <!-- pilcrow sign = paragraph sign,
+ U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+ = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1 "&#185;"> <!-- superscript one = superscript digit one,
+ U+00B9 ISOnum -->
+<!ENTITY ordm "&#186;"> <!-- masculine ordinal indicator,
+ U+00BA ISOnum -->
+<!ENTITY raquo "&#187;"> <!-- right-pointing double angle quotation mark
+ = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+ = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+ = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+ = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+ = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+ = latin capital letter A grave,
+ U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+ U+00C1 ISOlat1 -->
+<!ENTITY Acirc "&#194;"> <!-- latin capital letter A with circumflex,
+ U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+ U+00C3 ISOlat1 -->
+<!ENTITY Auml "&#196;"> <!-- latin capital letter A with diaeresis,
+ U+00C4 ISOlat1 -->
+<!ENTITY Aring "&#197;"> <!-- latin capital letter A with ring above
+ = latin capital letter A ring,
+ U+00C5 ISOlat1 -->
+<!ENTITY AElig "&#198;"> <!-- latin capital letter AE
+ = latin capital ligature AE,
+ U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+ U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+ U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+ U+00C9 ISOlat1 -->
+<!ENTITY Ecirc "&#202;"> <!-- latin capital letter E with circumflex,
+ U+00CA ISOlat1 -->
+<!ENTITY Euml "&#203;"> <!-- latin capital letter E with diaeresis,
+ U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+ U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+ U+00CD ISOlat1 -->
+<!ENTITY Icirc "&#206;"> <!-- latin capital letter I with circumflex,
+ U+00CE ISOlat1 -->
+<!ENTITY Iuml "&#207;"> <!-- latin capital letter I with diaeresis,
+ U+00CF ISOlat1 -->
+<!ENTITY ETH "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+ U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+ U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+ U+00D3 ISOlat1 -->
+<!ENTITY Ocirc "&#212;"> <!-- latin capital letter O with circumflex,
+ U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+ U+00D5 ISOlat1 -->
+<!ENTITY Ouml "&#214;"> <!-- latin capital letter O with diaeresis,
+ U+00D6 ISOlat1 -->
+<!ENTITY times "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+ = latin capital letter O slash,
+ U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+ U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+ U+00DA ISOlat1 -->
+<!ENTITY Ucirc "&#219;"> <!-- latin capital letter U with circumflex,
+ U+00DB ISOlat1 -->
+<!ENTITY Uuml "&#220;"> <!-- latin capital letter U with diaeresis,
+ U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+ U+00DD ISOlat1 -->
+<!ENTITY THORN "&#222;"> <!-- latin capital letter THORN,
+ U+00DE ISOlat1 -->
+<!ENTITY szlig "&#223;"> <!-- latin small letter sharp s = ess-zed,
+ U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+ = latin small letter a grave,
+ U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+ U+00E1 ISOlat1 -->
+<!ENTITY acirc "&#226;"> <!-- latin small letter a with circumflex,
+ U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+ U+00E3 ISOlat1 -->
+<!ENTITY auml "&#228;"> <!-- latin small letter a with diaeresis,
+ U+00E4 ISOlat1 -->
+<!ENTITY aring "&#229;"> <!-- latin small letter a with ring above
+ = latin small letter a ring,
+ U+00E5 ISOlat1 -->
+<!ENTITY aelig "&#230;"> <!-- latin small letter ae
+ = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+ U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+ U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+ U+00E9 ISOlat1 -->
+<!ENTITY ecirc "&#234;"> <!-- latin small letter e with circumflex,
+ U+00EA ISOlat1 -->
+<!ENTITY euml "&#235;"> <!-- latin small letter e with diaeresis,
+ U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+ U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+ U+00ED ISOlat1 -->
+<!ENTITY icirc "&#238;"> <!-- latin small letter i with circumflex,
+ U+00EE ISOlat1 -->
+<!ENTITY iuml "&#239;"> <!-- latin small letter i with diaeresis,
+ U+00EF ISOlat1 -->
+<!ENTITY eth "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+ U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+ U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+ U+00F3 ISOlat1 -->
+<!ENTITY ocirc "&#244;"> <!-- latin small letter o with circumflex,
+ U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+ U+00F5 ISOlat1 -->
+<!ENTITY ouml "&#246;"> <!-- latin small letter o with diaeresis,
+ U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+ = latin small letter o slash,
+ U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+ U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+ U+00FA ISOlat1 -->
+<!ENTITY ucirc "&#251;"> <!-- latin small letter u with circumflex,
+ U+00FB ISOlat1 -->
+<!ENTITY uuml "&#252;"> <!-- latin small letter u with diaeresis,
+ U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+ U+00FD ISOlat1 -->
+<!ENTITY thorn "&#254;"> <!-- latin small letter thorn,
+ U+00FE ISOlat1 -->
+<!ENTITY yuml "&#255;"> <!-- latin small letter y with diaeresis,
+ U+00FF ISOlat1 -->
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml-special.ent b/dom/tests/mochitest/dom-level2-html/files/xhtml-special.ent
new file mode 100644
index 0000000000..ca358b2fec
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+ %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot "&#34;"> <!-- quotation mark, U+0022 ISOnum -->
+<!ENTITY amp "&#38;#38;"> <!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#38;#60;"> <!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt "&#62;"> <!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY apos "&#39;"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig "&#338;"> <!-- latin capital ligature OE,
+ U+0152 ISOlat2 -->
+<!ENTITY oelig "&#339;"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron "&#352;"> <!-- latin capital letter S with caron,
+ U+0160 ISOlat2 -->
+<!ENTITY scaron "&#353;"> <!-- latin small letter s with caron,
+ U+0161 ISOlat2 -->
+<!ENTITY Yuml "&#376;"> <!-- latin capital letter Y with diaeresis,
+ U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ "&#710;"> <!-- modifier letter circumflex accent,
+ U+02C6 ISOpub -->
+<!ENTITY tilde "&#732;"> <!-- small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj "&#8204;"> <!-- zero width non-joiner,
+ U+200C NEW RFC 2070 -->
+<!ENTITY zwj "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo "&#8216;"> <!-- left single quotation mark,
+ U+2018 ISOnum -->
+<!ENTITY rsquo "&#8217;"> <!-- right single quotation mark,
+ U+2019 ISOnum -->
+<!ENTITY sbquo "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo "&#8220;"> <!-- left double quotation mark,
+ U+201C ISOnum -->
+<!ENTITY rdquo "&#8221;"> <!-- right double quotation mark,
+ U+201D ISOnum -->
+<!ENTITY bdquo "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo "&#8249;"> <!-- single left-pointing angle quotation mark,
+ U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo "&#8250;"> <!-- single right-pointing angle quotation mark,
+ U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro "&#8364;"> <!-- euro sign, U+20AC NEW -->
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml-symbol.ent b/dom/tests/mochitest/dom-level2-html/files/xhtml-symbol.ent
new file mode 100644
index 0000000000..63c2abfa6f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+ %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof "&#402;"> <!-- latin small letter f with hook = function
+ = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma "&#915;"> <!-- greek capital letter gamma,
+ U+0393 ISOgrk3 -->
+<!ENTITY Delta "&#916;"> <!-- greek capital letter delta,
+ U+0394 ISOgrk3 -->
+<!ENTITY Epsilon "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta "&#920;"> <!-- greek capital letter theta,
+ U+0398 ISOgrk3 -->
+<!ENTITY Iota "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda "&#923;"> <!-- greek capital letter lamda,
+ U+039B ISOgrk3 -->
+<!ENTITY Mu "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma "&#931;"> <!-- greek capital letter sigma,
+ U+03A3 ISOgrk3 -->
+<!ENTITY Tau "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon "&#933;"> <!-- greek capital letter upsilon,
+ U+03A5 ISOgrk3 -->
+<!ENTITY Phi "&#934;"> <!-- greek capital letter phi,
+ U+03A6 ISOgrk3 -->
+<!ENTITY Chi "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi "&#936;"> <!-- greek capital letter psi,
+ U+03A8 ISOgrk3 -->
+<!ENTITY Omega "&#937;"> <!-- greek capital letter omega,
+ U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha "&#945;"> <!-- greek small letter alpha,
+ U+03B1 ISOgrk3 -->
+<!ENTITY beta "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma "&#947;"> <!-- greek small letter gamma,
+ U+03B3 ISOgrk3 -->
+<!ENTITY delta "&#948;"> <!-- greek small letter delta,
+ U+03B4 ISOgrk3 -->
+<!ENTITY epsilon "&#949;"> <!-- greek small letter epsilon,
+ U+03B5 ISOgrk3 -->
+<!ENTITY zeta "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta "&#952;"> <!-- greek small letter theta,
+ U+03B8 ISOgrk3 -->
+<!ENTITY iota "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa "&#954;"> <!-- greek small letter kappa,
+ U+03BA ISOgrk3 -->
+<!ENTITY lambda "&#955;"> <!-- greek small letter lamda,
+ U+03BB ISOgrk3 -->
+<!ENTITY mu "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf "&#962;"> <!-- greek small letter final sigma,
+ U+03C2 ISOgrk3 -->
+<!ENTITY sigma "&#963;"> <!-- greek small letter sigma,
+ U+03C3 ISOgrk3 -->
+<!ENTITY tau "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon "&#965;"> <!-- greek small letter upsilon,
+ U+03C5 ISOgrk3 -->
+<!ENTITY phi "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega "&#969;"> <!-- greek small letter omega,
+ U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+ U+03D1 NEW -->
+<!ENTITY upsih "&#978;"> <!-- greek upsilon with hook symbol,
+ U+03D2 NEW -->
+<!ENTITY piv "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull "&#8226;"> <!-- bullet = black small circle,
+ U+2022 ISOpub -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+ U+2026 ISOpub -->
+<!ENTITY prime "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime "&#8243;"> <!-- double prime = seconds = inches,
+ U+2033 ISOtech -->
+<!ENTITY oline "&#8254;"> <!-- overline = spacing overscore,
+ U+203E NEW -->
+<!ENTITY frasl "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp "&#8472;"> <!-- script capital P = power set
+ = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image "&#8465;"> <!-- black-letter capital I = imaginary part,
+ U+2111 ISOamso -->
+<!ENTITY real "&#8476;"> <!-- black-letter capital R = real part symbol,
+ U+211C ISOamso -->
+<!ENTITY trade "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+ U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+ U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr "&#8629;"> <!-- downwards arrow with corner leftwards
+ = carriage return, U+21B5 NEW -->
+<!ENTITY lArr "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+ but also does not have any other character for that function. So lArr can
+ be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr "&#8658;"> <!-- rightwards double arrow,
+ U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have
+ another character with this function so rArr can be used for 'implies'
+ as ISOtech suggests -->
+<!ENTITY dArr "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr "&#8660;"> <!-- left right double arrow,
+ U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part "&#8706;"> <!-- partial differential, U+2202 ISOtech -->
+<!ENTITY exist "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla "&#8711;"> <!-- nabla = backward difference,
+ U+2207 ISOtech -->
+<!ENTITY isin "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod "&#8719;"> <!-- n-ary product = product sign,
+ U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+ the same glyph might be used for both -->
+<!ENTITY sum "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+ though the same glyph might be used for both -->
+<!ENTITY minus "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic "&#8730;"> <!-- square root = radical sign,
+ U+221A ISOtech -->
+<!ENTITY prop "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4 "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim "&#8764;"> <!-- tilde operator = varies with = similar to,
+ U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+ although the same glyph might be used to represent both -->
+<!ENTITY cong "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp "&#8776;"> <!-- almost equal to = asymptotic to,
+ U+2248 ISOamsr -->
+<!ENTITY ne "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge "&#8805;"> <!-- greater-than or equal to,
+ U+2265 ISOtech -->
+<!ENTITY sub "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe "&#8839;"> <!-- superset of or equal to,
+ U+2287 ISOtech -->
+<!ENTITY oplus "&#8853;"> <!-- circled plus = direct sum,
+ U+2295 ISOamsb -->
+<!ENTITY otimes "&#8855;"> <!-- circled times = vector product,
+ U+2297 ISOamsb -->
+<!ENTITY perp "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+ U+22A5 ISOtech -->
+<!ENTITY sdot "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil "&#8968;"> <!-- left ceiling = APL upstile,
+ U+2308 ISOamsc -->
+<!ENTITY rceil "&#8969;"> <!-- right ceiling, U+2309 ISOamsc -->
+<!ENTITY lfloor "&#8970;"> <!-- left floor = APL downstile,
+ U+230A ISOamsc -->
+<!ENTITY rfloor "&#8971;"> <!-- right floor, U+230B ISOamsc -->
+<!ENTITY lang "&#9001;"> <!-- left-pointing angle bracket = bra,
+ U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign'
+ or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang "&#9002;"> <!-- right-pointing angle bracket = ket,
+ U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign'
+ or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs "&#9827;"> <!-- black club suit = shamrock,
+ U+2663 ISOpub -->
+<!ENTITY hearts "&#9829;"> <!-- black heart suit = valentine,
+ U+2665 ISOpub -->
+<!ENTITY diams "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml1-frameset.dtd b/dom/tests/mochitest/dom-level2-html/files/xhtml1-frameset.dtd
new file mode 100644
index 0000000000..c22b666d19
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml1-frameset.dtd
@@ -0,0 +1,1235 @@
+<!--
+ Extensible HTML version 1.0 Frameset DTD
+
+ This is the same as HTML 4 Frameset except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+
+ $Revision: 1.1 $
+ $Date: 2008/03/29 19:06:30 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+ <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+ <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+ Black = #000000 Green = #008000
+ Silver = #C0C0C0 Lime = #00FF00
+ Gray = #808080 Olive = #808000
+ White = #FFFFFF Yellow = #FFFF00
+ Maroon = #800000 Navy = #000080
+ Red = #FF0000 Blue = #0000FF
+ Purple = #800080 Teal = #008080
+ Fuchsia= #FF00FF Aqua = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+ align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+ "object | applet | img | map | iframe">
+
+<!ENTITY % special.basic
+ "br | span | bdo">
+
+<!ENTITY % special
+ "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+ | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | isindex | fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+ sub, sup, font, or basefont -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+ %inline.forms; | %misc.inline;)*">
+
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | br | span | bdo | object | applet | img | map |
+ %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, frameset)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ id ID #IMPLIED
+ href %URI; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ language CDATA #IMPLIED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--======================= Frames =======================================-->
+
+<!-- only one noframes element permitted per document -->
+
+<!ELEMENT frameset (frameset|frame|noframes)*>
+<!ATTLIST frameset
+ %coreattrs;
+ rows %MultiLengths; #IMPLIED
+ cols %MultiLengths; #IMPLIED
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!-- reserved frame names start with "_" otherwise starts with letter -->
+
+<!-- tiled window within frameset -->
+
+<!ELEMENT frame EMPTY>
+<!ATTLIST frame
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ noresize (noresize) #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ >
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ align %ImgAlign; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes (body)>
+<!ATTLIST noframes
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ background %URI; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ text %Color; #IMPLIED
+ link %Color; #IMPLIED
+ vlink %Color; #IMPLIED
+ alink %Color; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ type %ULStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ >
+
+<!-- Ordered list numbering style
+
+ 1 arabic numbers 1, 2, 3, ...
+ a lower alpha a, b, c, ...
+ A upper alpha A, B, C, ...
+ i lower roman i, ii, iii, ...
+ I upper roman I, II, III, ...
+
+ The style is applied to the sequence number which by default
+ is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ type %OLStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ start %Number; #IMPLIED
+ >
+
+<!-- single column list (DEPRECATED) -->
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- multiple column list (DEPRECATED) -->
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ type %LIStyle; #IMPLIED
+ value %Number; #IMPLIED
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ align (left|center|right) #IMPLIED
+ noshade (noshade) #IMPLIED
+ size %Pixels; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding
+ "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ width %Number; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+ %attrs;
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ clear (left|all|right|none) "none"
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;> <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;> <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;> <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY> <!-- base font size -->
+<!ATTLIST basefont
+ id ID #IMPLIED
+ size CDATA #REQUIRED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+ %coreattrs;
+ %i18n;
+ size CDATA #IMPLIED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form |%inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #REQUIRED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Java applet ==================================-->
+<!--
+ One of code or object attributes must be present.
+ Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+ %coreattrs;
+ codebase %URI; #IMPLIED
+ archive CDATA #IMPLIED
+ code CDATA #IMPLIED
+ object CDATA #IMPLIED
+ alt %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ width %Length; #REQUIRED
+ height %Length; #REQUIRED
+ align %ImgAlign; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ name NMTOKEN #IMPLIED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ name NMTOKEN #IMPLIED
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ align %LAlign; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+ %coreattrs;
+ %i18n;
+ prompt %Text; #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=":"
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ align %TAlign; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+ %attrs;
+ align %CAlign; #IMPLIED
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ bgcolor %Color; #IMPLIED
+ >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Pixels; #IMPLIED
+ height %Pixels; #IMPLIED
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Pixels; #IMPLIED
+ height %Pixels; #IMPLIED
+ >
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml1-strict.dtd b/dom/tests/mochitest/dom-level2-html/files/xhtml1-strict.dtd
new file mode 100644
index 0000000000..06228785f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml1-strict.dtd
@@ -0,0 +1,978 @@
+<!--
+ Extensible HTML version 1.0 Strict DTD
+
+ This is the same as HTML 4 Strict except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+ $Revision: 1.1 $
+ $Date: 2008/03/29 19:06:30 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.pre
+ "br | span | bdo | map">
+
+
+<!ENTITY % special
+ "%special.pre; | object | img ">
+
+<!ENTITY % fontstyle "tt | i | b | big | small ">
+
+<!ENTITY % phrase "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym | sub | sup ">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding big, small, sup or sup -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
+ | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ href %URI; #REQUIRED
+ id ID #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+ Note that in this DTD there is no name attribute. That
+ is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ >
+
+<!ATTLIST caption
+ %attrs;
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
diff --git a/dom/tests/mochitest/dom-level2-html/files/xhtml1-transitional.dtd b/dom/tests/mochitest/dom-level2-html/files/xhtml1-transitional.dtd
new file mode 100644
index 0000000000..215a4b078b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/files/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--
+ Extensible HTML version 1.0 Transitional DTD
+
+ This is the same as HTML 4 Transitional except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+ $Revision: 1.1 $
+ $Date: 2008/03/29 19:06:30 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+ <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+ Black = #000000 Green = #008000
+ Silver = #C0C0C0 Lime = #00FF00
+ Gray = #808080 Olive = #808000
+ White = #FFFFFF Yellow = #FFFF00
+ Maroon = #800000 Navy = #000080
+ Red = #FF0000 Blue = #0000FF
+ Purple = #800080 Teal = #008080
+ Fuchsia= #FF00FF Aqua = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+ align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+ "object | applet | img | map | iframe">
+
+<!ENTITY % special.basic
+ "br | span | bdo">
+
+<!ENTITY % special
+ "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+ | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+ font, or basefont -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+ %inline.forms; | %misc.inline;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | br | span | bdo | object | applet | img | map |
+ %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ id ID #IMPLIED
+ href %URI; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ language CDATA #IMPLIED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ align %ImgAlign; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ background %URI; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ text %Color; #IMPLIED
+ link %Color; #IMPLIED
+ vlink %Color; #IMPLIED
+ alink %Color; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ type %ULStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ >
+
+<!-- Ordered list numbering style
+
+ 1 arabic numbers 1, 2, 3, ...
+ a lower alpha a, b, c, ...
+ A upper alpha A, B, C, ...
+ i lower roman i, ii, iii, ...
+ I upper roman I, II, III, ...
+
+ The style is applied to the sequence number which by default
+ is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ type %OLStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ start %Number; #IMPLIED
+ >
+
+<!-- single column list (DEPRECATED) -->
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- multiple column list (DEPRECATED) -->
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ type %LIStyle; #IMPLIED
+ value %Number; #IMPLIED
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ align (left|center|right) #IMPLIED
+ noshade (noshade) #IMPLIED
+ size %Pixels; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding
+ "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ width %Number; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+ %attrs;
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ clear (left|all|right|none) "none"
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;> <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;> <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;> <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY> <!-- base font size -->
+<!ATTLIST basefont
+ id ID #IMPLIED
+ size CDATA #REQUIRED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+ %coreattrs;
+ %i18n;
+ size CDATA #IMPLIED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #REQUIRED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Java applet ==================================-->
+<!--
+ One of code or object attributes must be present.
+ Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+ %coreattrs;
+ codebase %URI; #IMPLIED
+ archive CDATA #IMPLIED
+ code CDATA #IMPLIED
+ object CDATA #IMPLIED
+ alt %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ width %Length; #REQUIRED
+ height %Length; #REQUIRED
+ align %ImgAlign; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ name NMTOKEN #IMPLIED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Length; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name CDATA #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ name NMTOKEN #IMPLIED
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ align %LAlign; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+ %coreattrs;
+ %i18n;
+ prompt %Text; #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ align %TAlign; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+ %attrs;
+ align %CAlign; #IMPLIED
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ bgcolor %Color; #IMPLIED
+ >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
diff --git a/dom/tests/mochitest/dom-level2-html/mochitest.ini b/dom/tests/mochitest/dom-level2-html/mochitest.ini
new file mode 100644
index 0000000000..17c9ec57a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/mochitest.ini
@@ -0,0 +1,863 @@
+[DEFAULT]
+support-files =
+ DOMTestCase.js
+ files/anchor.html
+ files/anchor.xhtml
+ files/anchor.xml
+ files/anchor2.html
+ files/anchor2.xhtml
+ files/anchor2.xml
+ files/applet.html
+ files/applet.xhtml
+ files/applet.xml
+ files/applet2.class
+ files/applet2.html
+ files/applet2.xhtml
+ files/applet2.xml
+ files/area.html
+ files/area.xhtml
+ files/area.xml
+ files/area2.html
+ files/area2.xhtml
+ files/area2.xml
+ files/base.html
+ files/base.xhtml
+ files/base.xml
+ files/base2.html
+ files/base2.xhtml
+ files/base2.xml
+ files/body.html
+ files/body.xhtml
+ files/body.xml
+ files/br.html
+ files/br.xhtml
+ files/br.xml
+ files/button.html
+ files/button.xhtml
+ files/button.xml
+ files/collection.html
+ files/collection.xhtml
+ files/collection.xml
+ files/directory.html
+ files/directory.xhtml
+ files/directory.xml
+ files/div.html
+ files/div.xhtml
+ files/div.xml
+ files/dl.html
+ files/dl.xhtml
+ files/dl.xml
+ files/document.html
+ files/document-with-applet.html
+ files/document.xhtml
+ files/document.xml
+ files/element.html
+ files/element.xhtml
+ files/element.xml
+ files/fieldset.html
+ files/fieldset.xhtml
+ files/fieldset.xml
+ files/font.html
+ files/font.xhtml
+ files/font.xml
+ files/form.html
+ files/form.xhtml
+ files/form.xml
+ files/form2.html
+ files/form2.xhtml
+ files/form2.xml
+ files/form3.html
+ files/form3.xhtml
+ files/form3.xml
+ files/frame.html
+ files/frame.xhtml
+ files/frame.xml
+ files/frame2.html
+ files/frame2.xhtml
+ files/frame2.xml
+ files/frameset.html
+ files/frameset.xhtml
+ files/frameset.xml
+ files/heading.html
+ files/heading.xhtml
+ files/heading.xml
+ files/hr.html
+ files/hr.xhtml
+ files/hr.xml
+ files/html.html
+ files/html.xhtml
+ files/html.xml
+ files/iframe.html
+ files/iframe.xhtml
+ files/iframe.xml
+ files/iframe2.html
+ files/iframe2.xhtml
+ files/iframe2.xml
+ files/img.html
+ files/img.xhtml
+ files/img.xml
+ files/index.html
+ files/input.html
+ files/input.xhtml
+ files/input.xml
+ files/isindex.html
+ files/isindex.xhtml
+ files/isindex.xml
+ files/label.html
+ files/label.xhtml
+ files/label.xml
+ files/legend.html
+ files/legend.xhtml
+ files/legend.xml
+ files/li.html
+ files/li.xhtml
+ files/li.xml
+ files/link.html
+ files/link.xhtml
+ files/link.xml
+ files/link2.html
+ files/link2.xhtml
+ files/link2.xml
+ files/map.html
+ files/map.xhtml
+ files/map.xml
+ files/menu.html
+ files/menu.xhtml
+ files/menu.xml
+ files/meta.html
+ files/meta.xhtml
+ files/meta.xml
+ files/mod.html
+ files/mod.xhtml
+ files/mod.xml
+ files/object.html
+ files/object.xhtml
+ files/object.xml
+ files/object2.html
+ files/object2.xhtml
+ files/object2.xml
+ files/olist.html
+ files/olist.xhtml
+ files/olist.xml
+ files/optgroup.html
+ files/optgroup.xhtml
+ files/optgroup.xml
+ files/option.html
+ files/option.xhtml
+ files/option.xml
+ files/optionscollection.html
+ files/optionscollection.xhtml
+ files/optionscollection.xml
+ files/paragraph.html
+ files/paragraph.xhtml
+ files/paragraph.xml
+ files/param.html
+ files/param.xhtml
+ files/param.xml
+ files/pre.html
+ files/pre.xhtml
+ files/pre.xml
+ files/quote.html
+ files/quote.xhtml
+ files/quote.xml
+ files/right.png
+ files/script.html
+ files/script.xhtml
+ files/script.xml
+ files/select.html
+ files/select.xhtml
+ files/select.xml
+ files/style.html
+ files/style.xhtml
+ files/style.xml
+ files/table.html
+ files/table.xhtml
+ files/table.xml
+ files/table1.html
+ files/table1.xhtml
+ files/table1.xml
+ files/tablecaption.html
+ files/tablecaption.xhtml
+ files/tablecaption.xml
+ files/tablecell.html
+ files/tablecell.xhtml
+ files/tablecell.xml
+ files/tablecol.html
+ files/tablecol.xhtml
+ files/tablecol.xml
+ files/tablerow.html
+ files/tablerow.xhtml
+ files/tablerow.xml
+ files/tablesection.html
+ files/tablesection.xhtml
+ files/tablesection.xml
+ files/textarea.html
+ files/textarea.xhtml
+ files/textarea.xml
+ files/title.html
+ files/title.xhtml
+ files/title.xml
+ files/ulist.html
+ files/ulist.xhtml
+ files/ulist.xml
+ files/w3c_main.png
+ files/xhtml-lat1.ent
+ files/xhtml-special.ent
+ files/xhtml-symbol.ent
+ files/xhtml1-frameset.dtd
+ files/xhtml1-strict.dtd
+ files/xhtml1-transitional.dtd
+
+[test_HTMLAnchorElement01.html]
+[test_HTMLAnchorElement02.html]
+[test_HTMLAnchorElement03.html]
+[test_HTMLAnchorElement04.html]
+[test_HTMLAnchorElement05.html]
+[test_HTMLAnchorElement06.html]
+[test_HTMLAnchorElement07.html]
+[test_HTMLAnchorElement08.html]
+[test_HTMLAnchorElement09.html]
+[test_HTMLAnchorElement10.html]
+[test_HTMLAnchorElement11.html]
+[test_HTMLAnchorElement12.html]
+[test_HTMLAnchorElement13.html]
+[test_HTMLAnchorElement14.html]
+[test_HTMLAreaElement01.html]
+[test_HTMLAreaElement02.html]
+[test_HTMLAreaElement03.html]
+[test_HTMLAreaElement04.html]
+[test_HTMLAreaElement05.html]
+[test_HTMLAreaElement06.html]
+[test_HTMLAreaElement07.html]
+[test_HTMLAreaElement08.html]
+[test_HTMLBRElement01.html]
+[test_HTMLBaseElement01.html]
+[test_HTMLBaseElement02.html]
+[test_HTMLBodyElement01.html]
+[test_HTMLBodyElement02.html]
+[test_HTMLBodyElement03.html]
+[test_HTMLBodyElement04.html]
+[test_HTMLBodyElement05.html]
+[test_HTMLBodyElement06.html]
+[test_HTMLButtonElement01.html]
+[test_HTMLButtonElement02.html]
+[test_HTMLButtonElement03.html]
+[test_HTMLButtonElement04.html]
+[test_HTMLButtonElement05.html]
+[test_HTMLButtonElement06.html]
+[test_HTMLButtonElement07.html]
+[test_HTMLButtonElement08.html]
+[test_HTMLCollection01.html]
+[test_HTMLCollection02.html]
+[test_HTMLCollection03.html]
+[test_HTMLCollection04.html]
+[test_HTMLCollection05.html]
+[test_HTMLCollection06.html]
+[test_HTMLCollection07.html]
+[test_HTMLCollection08.html]
+[test_HTMLCollection09.html]
+[test_HTMLCollection10.html]
+[test_HTMLCollection11.html]
+[test_HTMLCollection12.html]
+[test_HTMLDirectoryElement01.html]
+[test_HTMLDivElement01.html]
+[test_HTMLDlistElement01.html]
+[test_HTMLDocument01.html]
+[test_HTMLDocument02.html]
+[test_HTMLDocument03.html]
+[test_HTMLDocument04.html]
+[test_HTMLDocument05.html]
+[test_HTMLDocument07.html]
+[test_HTMLDocument09.html]
+[test_HTMLDocument10.html]
+[test_HTMLDocument11.html]
+[test_HTMLDocument12.html]
+[test_HTMLDocument13.html]
+[test_HTMLDocument14.html]
+[test_HTMLDocument15.html]
+[test_HTMLDocument16.html]
+[test_HTMLDocument17.html]
+[test_HTMLDocument18.html]
+[test_HTMLDocument19.html]
+[test_HTMLDocument20.html]
+[test_HTMLDocument21.html]
+[test_HTMLElement01.html]
+[test_HTMLElement02.html]
+[test_HTMLElement03.html]
+[test_HTMLElement04.html]
+[test_HTMLElement05.html]
+[test_HTMLElement06.html]
+[test_HTMLElement07.html]
+[test_HTMLElement08.html]
+[test_HTMLElement09.html]
+[test_HTMLElement10.html]
+[test_HTMLElement100.html]
+[test_HTMLElement101.html]
+[test_HTMLElement102.html]
+[test_HTMLElement103.html]
+[test_HTMLElement104.html]
+[test_HTMLElement105.html]
+[test_HTMLElement106.html]
+[test_HTMLElement107.html]
+[test_HTMLElement108.html]
+[test_HTMLElement109.html]
+[test_HTMLElement11.html]
+[test_HTMLElement110.html]
+[test_HTMLElement111.html]
+[test_HTMLElement112.html]
+[test_HTMLElement113.html]
+[test_HTMLElement114.html]
+[test_HTMLElement115.html]
+[test_HTMLElement116.html]
+[test_HTMLElement117.html]
+[test_HTMLElement118.html]
+[test_HTMLElement119.html]
+[test_HTMLElement12.html]
+[test_HTMLElement120.html]
+[test_HTMLElement121.html]
+[test_HTMLElement122.html]
+[test_HTMLElement123.html]
+[test_HTMLElement124.html]
+[test_HTMLElement125.html]
+[test_HTMLElement126.html]
+[test_HTMLElement127.html]
+[test_HTMLElement128.html]
+[test_HTMLElement129.html]
+[test_HTMLElement13.html]
+[test_HTMLElement130.html]
+[test_HTMLElement131.html]
+[test_HTMLElement132.html]
+[test_HTMLElement133.html]
+[test_HTMLElement134.html]
+[test_HTMLElement135.html]
+[test_HTMLElement136.html]
+[test_HTMLElement137.html]
+[test_HTMLElement138.html]
+[test_HTMLElement139.html]
+[test_HTMLElement14.html]
+[test_HTMLElement140.html]
+[test_HTMLElement141.html]
+[test_HTMLElement142.html]
+[test_HTMLElement143.html]
+[test_HTMLElement144.html]
+[test_HTMLElement145.html]
+[test_HTMLElement15.html]
+[test_HTMLElement16.html]
+[test_HTMLElement17.html]
+[test_HTMLElement18.html]
+[test_HTMLElement19.html]
+[test_HTMLElement20.html]
+[test_HTMLElement21.html]
+[test_HTMLElement22.html]
+[test_HTMLElement23.html]
+[test_HTMLElement24.html]
+[test_HTMLElement25.html]
+[test_HTMLElement26.html]
+[test_HTMLElement27.html]
+[test_HTMLElement28.html]
+[test_HTMLElement29.html]
+[test_HTMLElement30.html]
+[test_HTMLElement31.html]
+[test_HTMLElement32.html]
+[test_HTMLElement33.html]
+[test_HTMLElement34.html]
+[test_HTMLElement35.html]
+[test_HTMLElement36.html]
+[test_HTMLElement37.html]
+[test_HTMLElement38.html]
+[test_HTMLElement39.html]
+[test_HTMLElement40.html]
+[test_HTMLElement41.html]
+[test_HTMLElement42.html]
+[test_HTMLElement43.html]
+[test_HTMLElement44.html]
+[test_HTMLElement45.html]
+[test_HTMLElement46.html]
+[test_HTMLElement47.html]
+[test_HTMLElement48.html]
+[test_HTMLElement49.html]
+[test_HTMLElement50.html]
+[test_HTMLElement51.html]
+[test_HTMLElement52.html]
+[test_HTMLElement53.html]
+[test_HTMLElement54.html]
+[test_HTMLElement55.html]
+[test_HTMLElement56.html]
+[test_HTMLElement57.html]
+[test_HTMLElement58.html]
+[test_HTMLElement59.html]
+[test_HTMLElement60.html]
+[test_HTMLElement61.html]
+[test_HTMLElement62.html]
+[test_HTMLElement63.html]
+[test_HTMLElement64.html]
+[test_HTMLElement65.html]
+[test_HTMLElement66.html]
+[test_HTMLElement67.html]
+[test_HTMLElement68.html]
+[test_HTMLElement69.html]
+[test_HTMLElement70.html]
+[test_HTMLElement71.html]
+[test_HTMLElement72.html]
+[test_HTMLElement73.html]
+[test_HTMLElement74.html]
+[test_HTMLElement75.html]
+[test_HTMLElement76.html]
+[test_HTMLElement77.html]
+[test_HTMLElement78.html]
+[test_HTMLElement79.html]
+[test_HTMLElement80.html]
+[test_HTMLElement81.html]
+[test_HTMLElement82.html]
+[test_HTMLElement83.html]
+[test_HTMLElement84.html]
+[test_HTMLElement85.html]
+[test_HTMLElement86.html]
+[test_HTMLElement87.html]
+[test_HTMLElement88.html]
+[test_HTMLElement89.html]
+[test_HTMLElement90.html]
+[test_HTMLElement91.html]
+[test_HTMLElement92.html]
+[test_HTMLElement93.html]
+[test_HTMLElement94.html]
+[test_HTMLElement95.html]
+[test_HTMLElement96.html]
+[test_HTMLElement97.html]
+[test_HTMLElement98.html]
+[test_HTMLElement99.html]
+[test_HTMLFieldSetElement01.html]
+[test_HTMLFieldSetElement02.html]
+[test_HTMLFontElement01.html]
+[test_HTMLFontElement02.html]
+[test_HTMLFontElement03.html]
+[test_HTMLFormElement01.html]
+[test_HTMLFormElement02.html]
+[test_HTMLFormElement03.html]
+[test_HTMLFormElement04.html]
+[test_HTMLFormElement05.html]
+[test_HTMLFormElement06.html]
+[test_HTMLFormElement07.html]
+[test_HTMLFormElement08.html]
+[test_HTMLFormElement09.html]
+[test_HTMLFormElement10.html]
+[test_HTMLFrameElement01.html]
+[test_HTMLFrameElement02.html]
+[test_HTMLFrameElement03.html]
+[test_HTMLFrameElement04.html]
+[test_HTMLFrameElement05.html]
+[test_HTMLFrameElement06.html]
+[test_HTMLFrameElement07.html]
+[test_HTMLFrameElement08.html]
+[test_HTMLFrameElement09.html]
+[test_HTMLFrameSetElement01.html]
+[test_HTMLFrameSetElement02.html]
+[test_HTMLHRElement01.html]
+[test_HTMLHRElement02.html]
+[test_HTMLHRElement03.html]
+[test_HTMLHRElement04.html]
+[test_HTMLHeadingElement01.html]
+[test_HTMLHeadingElement02.html]
+[test_HTMLHeadingElement03.html]
+[test_HTMLHeadingElement04.html]
+[test_HTMLHeadingElement05.html]
+[test_HTMLHeadingElement06.html]
+[test_HTMLHtmlElement01.html]
+[test_HTMLIFrameElement01.html]
+[test_HTMLIFrameElement02.html]
+[test_HTMLIFrameElement03.html]
+[test_HTMLIFrameElement04.html]
+[test_HTMLIFrameElement05.html]
+[test_HTMLIFrameElement06.html]
+[test_HTMLIFrameElement07.html]
+[test_HTMLIFrameElement08.html]
+[test_HTMLIFrameElement09.html]
+[test_HTMLIFrameElement10.html]
+[test_HTMLIFrameElement11.html]
+[test_HTMLImageElement01.html]
+[test_HTMLImageElement02.html]
+[test_HTMLImageElement03.html]
+[test_HTMLImageElement04.html]
+[test_HTMLImageElement05.html]
+[test_HTMLImageElement06.html]
+[test_HTMLImageElement07.html]
+[test_HTMLImageElement08.html]
+[test_HTMLImageElement09.html]
+[test_HTMLImageElement10.html]
+[test_HTMLImageElement11.html]
+[test_HTMLImageElement12.html]
+[test_HTMLInputElement01.html]
+[test_HTMLInputElement02.html]
+[test_HTMLInputElement03.html]
+[test_HTMLInputElement04.html]
+[test_HTMLInputElement05.html]
+[test_HTMLInputElement06.html]
+[test_HTMLInputElement07.html]
+[test_HTMLInputElement08.html]
+[test_HTMLInputElement09.html]
+[test_HTMLInputElement10.html]
+[test_HTMLInputElement11.html]
+[test_HTMLInputElement12.html]
+[test_HTMLInputElement13.html]
+[test_HTMLInputElement14.html]
+[test_HTMLInputElement15.html]
+[test_HTMLInputElement16.html]
+[test_HTMLInputElement17.html]
+[test_HTMLInputElement18.html]
+[test_HTMLInputElement19.html]
+[test_HTMLInputElement20.html]
+[test_HTMLInputElement21.html]
+[test_HTMLInputElement22.html]
+[test_HTMLLIElement01.html]
+[test_HTMLLIElement02.html]
+[test_HTMLLabelElement01.html]
+[test_HTMLLabelElement02.html]
+[test_HTMLLabelElement03.html]
+[test_HTMLLabelElement04.html]
+[test_HTMLLegendElement01.html]
+[test_HTMLLegendElement02.html]
+[test_HTMLLegendElement03.html]
+[test_HTMLLegendElement04.html]
+[test_HTMLLinkElement01.html]
+[test_HTMLLinkElement02.html]
+[test_HTMLLinkElement03.html]
+[test_HTMLLinkElement04.html]
+[test_HTMLLinkElement05.html]
+[test_HTMLLinkElement06.html]
+[test_HTMLLinkElement07.html]
+[test_HTMLLinkElement08.html]
+[test_HTMLLinkElement09.html]
+[test_HTMLMapElement01.html]
+[test_HTMLMapElement02.html]
+[test_HTMLMenuElement01.html]
+[test_HTMLMetaElement01.html]
+[test_HTMLMetaElement02.html]
+[test_HTMLMetaElement03.html]
+[test_HTMLMetaElement04.html]
+[test_HTMLModElement01.html]
+[test_HTMLModElement02.html]
+[test_HTMLModElement03.html]
+[test_HTMLModElement04.html]
+[test_HTMLOListElement01.html]
+[test_HTMLOListElement02.html]
+[test_HTMLOListElement03.html]
+[test_HTMLObjectElement01.html]
+[test_HTMLObjectElement02.html]
+[test_HTMLObjectElement03.html]
+[test_HTMLObjectElement04.html]
+[test_HTMLObjectElement05.html]
+[test_HTMLObjectElement06.html]
+[test_HTMLObjectElement07.html]
+[test_HTMLObjectElement08.html]
+[test_HTMLObjectElement09.html]
+[test_HTMLObjectElement10.html]
+[test_HTMLObjectElement11.html]
+[test_HTMLObjectElement12.html]
+[test_HTMLObjectElement13.html]
+[test_HTMLObjectElement14.html]
+[test_HTMLObjectElement15.html]
+[test_HTMLObjectElement16.html]
+[test_HTMLObjectElement17.html]
+[test_HTMLObjectElement18.html]
+[test_HTMLObjectElement19.html]
+[test_HTMLObjectElement20.html]
+[test_HTMLOptGroupElement01.html]
+[test_HTMLOptGroupElement02.html]
+[test_HTMLOptionElement01.html]
+[test_HTMLOptionElement02.html]
+[test_HTMLOptionElement03.html]
+[test_HTMLOptionElement04.html]
+[test_HTMLOptionElement05.html]
+[test_HTMLOptionElement06.html]
+[test_HTMLOptionElement07.html]
+[test_HTMLOptionElement08.html]
+[test_HTMLOptionElement09.html]
+[test_HTMLOptionsCollection01.html]
+[test_HTMLOptionsCollection02.html]
+[test_HTMLOptionsCollection03.html]
+[test_HTMLOptionsCollection04.html]
+[test_HTMLOptionsCollection05.html]
+[test_HTMLOptionsCollection06.html]
+[test_HTMLOptionsCollection07.html]
+[test_HTMLParagraphElement01.html]
+[test_HTMLParamElement01.html]
+[test_HTMLParamElement02.html]
+[test_HTMLParamElement03.html]
+[test_HTMLParamElement04.html]
+[test_HTMLPreElement01.html]
+[test_HTMLQuoteElement01.html]
+[test_HTMLQuoteElement02.html]
+[test_HTMLScriptElement01.html]
+[test_HTMLScriptElement02.html]
+[test_HTMLScriptElement03.html]
+[test_HTMLScriptElement04.html]
+[test_HTMLScriptElement05.html]
+[test_HTMLScriptElement06.html]
+[test_HTMLScriptElement07.html]
+[test_HTMLSelectElement01.html]
+[test_HTMLSelectElement02.html]
+[test_HTMLSelectElement03.html]
+[test_HTMLSelectElement04.html]
+[test_HTMLSelectElement05.html]
+[test_HTMLSelectElement06.html]
+[test_HTMLSelectElement07.html]
+[test_HTMLSelectElement08.html]
+[test_HTMLSelectElement09.html]
+[test_HTMLSelectElement10.html]
+[test_HTMLSelectElement11.html]
+[test_HTMLSelectElement12.html]
+[test_HTMLSelectElement13.html]
+[test_HTMLSelectElement14.html]
+[test_HTMLSelectElement15.html]
+[test_HTMLSelectElement16.html]
+[test_HTMLSelectElement17.html]
+[test_HTMLSelectElement18.html]
+[test_HTMLSelectElement19.html]
+[test_HTMLSelectElement20.html]
+[test_HTMLStyleElement01.html]
+[test_HTMLStyleElement02.html]
+[test_HTMLStyleElement03.html]
+[test_HTMLTableCaptionElement01.html]
+[test_HTMLTableCellElement01.html]
+[test_HTMLTableCellElement02.html]
+[test_HTMLTableCellElement03.html]
+[test_HTMLTableCellElement04.html]
+[test_HTMLTableCellElement05.html]
+[test_HTMLTableCellElement06.html]
+[test_HTMLTableCellElement07.html]
+[test_HTMLTableCellElement08.html]
+[test_HTMLTableCellElement09.html]
+[test_HTMLTableCellElement10.html]
+[test_HTMLTableCellElement11.html]
+[test_HTMLTableCellElement12.html]
+[test_HTMLTableCellElement13.html]
+[test_HTMLTableCellElement14.html]
+[test_HTMLTableCellElement15.html]
+[test_HTMLTableCellElement16.html]
+[test_HTMLTableCellElement17.html]
+[test_HTMLTableCellElement18.html]
+[test_HTMLTableCellElement19.html]
+[test_HTMLTableCellElement20.html]
+[test_HTMLTableCellElement21.html]
+[test_HTMLTableCellElement22.html]
+[test_HTMLTableCellElement23.html]
+[test_HTMLTableCellElement24.html]
+[test_HTMLTableCellElement25.html]
+[test_HTMLTableCellElement26.html]
+[test_HTMLTableCellElement27.html]
+[test_HTMLTableCellElement28.html]
+[test_HTMLTableCellElement29.html]
+[test_HTMLTableCellElement30.html]
+[test_HTMLTableColElement01.html]
+[test_HTMLTableColElement02.html]
+[test_HTMLTableColElement03.html]
+[test_HTMLTableColElement04.html]
+[test_HTMLTableColElement05.html]
+[test_HTMLTableColElement06.html]
+[test_HTMLTableColElement07.html]
+[test_HTMLTableColElement08.html]
+[test_HTMLTableColElement09.html]
+[test_HTMLTableColElement10.html]
+[test_HTMLTableColElement11.html]
+[test_HTMLTableColElement12.html]
+[test_HTMLTableElement01.html]
+[test_HTMLTableElement02.html]
+[test_HTMLTableElement03.html]
+[test_HTMLTableElement04.html]
+[test_HTMLTableElement05.html]
+[test_HTMLTableElement06.html]
+[test_HTMLTableElement07.html]
+[test_HTMLTableElement08.html]
+[test_HTMLTableElement09.html]
+[test_HTMLTableElement10.html]
+[test_HTMLTableElement11.html]
+[test_HTMLTableElement12.html]
+[test_HTMLTableElement13.html]
+[test_HTMLTableElement14.html]
+[test_HTMLTableElement15.html]
+[test_HTMLTableElement16.html]
+[test_HTMLTableElement17.html]
+[test_HTMLTableElement18.html]
+[test_HTMLTableElement19.html]
+[test_HTMLTableElement20.html]
+[test_HTMLTableElement21.html]
+[test_HTMLTableElement22.html]
+[test_HTMLTableElement23.html]
+[test_HTMLTableElement24.html]
+[test_HTMLTableElement25.html]
+[test_HTMLTableElement26.html]
+[test_HTMLTableElement27.html]
+[test_HTMLTableElement28.html]
+[test_HTMLTableElement29.html]
+[test_HTMLTableElement30.html]
+[test_HTMLTableElement31.html]
+[test_HTMLTableElement32.html]
+[test_HTMLTableElement33.html]
+[test_HTMLTableElement34.html]
+[test_HTMLTableElement35.html]
+[test_HTMLTableElement36.html]
+[test_HTMLTableElement37.html]
+[test_HTMLTableElement38.html]
+[test_HTMLTableElement39.html]
+[test_HTMLTableElement40.html]
+[test_HTMLTableRowElement01.html]
+[test_HTMLTableRowElement02.html]
+[test_HTMLTableRowElement03.html]
+[test_HTMLTableRowElement04.html]
+[test_HTMLTableRowElement05.html]
+[test_HTMLTableRowElement06.html]
+[test_HTMLTableRowElement07.html]
+[test_HTMLTableRowElement08.html]
+[test_HTMLTableRowElement09.html]
+[test_HTMLTableRowElement10.html]
+[test_HTMLTableRowElement11.html]
+[test_HTMLTableRowElement12.html]
+[test_HTMLTableRowElement13.html]
+[test_HTMLTableRowElement14.html]
+[test_HTMLTableRowElement15.html]
+[test_HTMLTableRowElement16.html]
+[test_HTMLTableRowElement17.html]
+[test_HTMLTableRowElement18.html]
+[test_HTMLTableRowElement19.html]
+[test_HTMLTableRowElement20.html]
+[test_HTMLTableRowElement21.html]
+[test_HTMLTableSectionElement01.html]
+[test_HTMLTableSectionElement02.html]
+[test_HTMLTableSectionElement03.html]
+[test_HTMLTableSectionElement04.html]
+[test_HTMLTableSectionElement05.html]
+[test_HTMLTableSectionElement06.html]
+[test_HTMLTableSectionElement07.html]
+[test_HTMLTableSectionElement08.html]
+[test_HTMLTableSectionElement09.html]
+[test_HTMLTableSectionElement10.html]
+[test_HTMLTableSectionElement11.html]
+[test_HTMLTableSectionElement12.html]
+[test_HTMLTableSectionElement13.html]
+[test_HTMLTableSectionElement14.html]
+[test_HTMLTableSectionElement15.html]
+[test_HTMLTableSectionElement16.html]
+[test_HTMLTableSectionElement17.html]
+[test_HTMLTableSectionElement18.html]
+[test_HTMLTableSectionElement19.html]
+[test_HTMLTableSectionElement20.html]
+[test_HTMLTableSectionElement21.html]
+[test_HTMLTableSectionElement22.html]
+[test_HTMLTableSectionElement23.html]
+[test_HTMLTableSectionElement24.html]
+[test_HTMLTableSectionElement25.html]
+[test_HTMLTableSectionElement26.html]
+[test_HTMLTableSectionElement27.html]
+[test_HTMLTableSectionElement28.html]
+[test_HTMLTableSectionElement29.html]
+[test_HTMLTableSectionElement30.html]
+[test_HTMLTableSectionElement31.html]
+[test_HTMLTextAreaElement01.html]
+[test_HTMLTextAreaElement02.html]
+[test_HTMLTextAreaElement03.html]
+[test_HTMLTextAreaElement04.html]
+[test_HTMLTextAreaElement05.html]
+[test_HTMLTextAreaElement06.html]
+[test_HTMLTextAreaElement07.html]
+[test_HTMLTextAreaElement08.html]
+[test_HTMLTextAreaElement09.html]
+[test_HTMLTextAreaElement10.html]
+[test_HTMLTextAreaElement11.html]
+[test_HTMLTextAreaElement12.html]
+[test_HTMLTextAreaElement13.html]
+[test_HTMLTextAreaElement14.html]
+[test_HTMLTextAreaElement15.html]
+[test_HTMLTitleElement01.html]
+[test_HTMLUListElement01.html]
+[test_HTMLUListElement02.html]
+[test_anchor01.html]
+[test_anchor02.html]
+[test_anchor03.html]
+[test_anchor04.html]
+[test_anchor05.html]
+[test_anchor06.html]
+[test_area01.html]
+[test_area02.html]
+[test_area03.html]
+[test_area04.html]
+[test_body01.html]
+[test_button01.html]
+[test_button02.html]
+[test_button03.html]
+[test_button04.html]
+[test_button05.html]
+[test_button06.html]
+[test_button07.html]
+[test_button08.html]
+[test_button09.html]
+[test_dlist01.html]
+[test_doc01.html]
+[test_hasFeature01.html]
+[test_hasFeature02.html]
+[test_hasFeature03.html]
+[test_hasFeature04.html]
+[test_hasFeature05.html]
+[test_hasFeature06.html]
+[test_object01.html]
+[test_object02.html]
+[test_object03.html]
+[test_object04.html]
+[test_object05.html]
+[test_object06.html]
+[test_object07.html]
+[test_object08.html]
+[test_object09.html]
+[test_object10.html]
+[test_object11.html]
+[test_object12.html]
+[test_object13.html]
+[test_object14.html]
+[test_object15.html]
+[test_table01.html]
+[test_table02.html]
+[test_table03.html]
+[test_table04.html]
+[test_table06.html]
+[test_table07.html]
+[test_table08.html]
+[test_table09.html]
+[test_table10.html]
+[test_table12.html]
+[test_table15.html]
+[test_table17.html]
+[test_table18.html]
+[test_table19.html]
+[test_table20.html]
+[test_table21.html]
+[test_table22.html]
+[test_table23.html]
+[test_table24.html]
+[test_table25.html]
+[test_table26.html]
+[test_table27.html]
+[test_table28.html]
+[test_table29.html]
+[test_table30.html]
+[test_table31.html]
+[test_table32.html]
+[test_table33.html]
+[test_table34.html]
+[test_table35.html]
+[test_table36.html]
+[test_table37.html]
+[test_table38.html]
+[test_table39.html]
+[test_table40.html]
+[test_table41.html]
+[test_table42.html]
+[test_table43.html]
+[test_table44.html]
+[test_table45.html]
+[test_table46.html]
+[test_table47.html]
+[test_table48.html]
+[test_table49.html]
+[test_table50.html]
+[test_table51.html]
+[test_table52.html]
+[test_table53.html]
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement01.html
new file mode 100644
index 0000000000..dc899e3861
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute is a single character access key to give
+ access to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724
+*/
+function HTMLAnchorElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","g",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement01</h2>
+<p>&lt;test name='HTMLAnchorElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute is a single character access key to give
+ access to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLAnchorElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"g"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement02.html
new file mode 100644
index 0000000000..9df6310722
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charset attribute indicates the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266
+*/
+function HTMLAnchorElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharset;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcharset = testNode.charset;
+
+ assertEquals("charsetLink","US-ASCII",vcharset);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement02</h2>
+<p>&lt;test name='HTMLAnchorElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charset attribute indicates the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharset' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;charset interface='HTMLAnchorElement' obj='testNode' var='vcharset'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharset' expected='"US-ASCII"' <a id="charsetLink">id='charsetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement03.html
new file mode 100644
index 0000000000..8255bd3067
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The coords attribute is a comma-seperated list of lengths, defining
+ an active region geometry.
+
+ Retrieve the coords attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539
+*/
+function HTMLAnchorElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vcoords;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcoords = testNode.coords;
+
+ assertEquals("coordsLink","0,0,100,100",vcoords);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement03</h2>
+<p>&lt;test name='HTMLAnchorElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The coords attribute is a comma-seperated list of lengths, defining
+ an active region geometry.
+
+ Retrieve the coords attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcoords' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;coords interface='HTMLAnchorElement' obj='testNode' var='vcoords'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcoords' expected='"0,0,100,100"' <a id="coordsLink">id='coordsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement04.html
new file mode 100644
index 0000000000..01342aa7af
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The href attribute contains the URL of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319
+*/
+function HTMLAnchorElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vhref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhref = testNode.href;
+
+ assertURIEquals("hrefLink",null,null,null,"submit.gif",null,null,null,null,vhref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement04</h2>
+<p>&lt;test name='HTMLAnchorElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The href attribute contains the URL of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhref' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;href interface='HTMLAnchorElement' obj='testNode' var='vhref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vhref' file='"submit.gif"' <a id="hrefLink">id='hrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement05.html
new file mode 100644
index 0000000000..679063c4ff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The hreflang attribute contains the language code of the linked resource.
+
+ Retrieve the hreflang attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87358513
+*/
+function HTMLAnchorElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vhreflink;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhreflink = testNode.hreflang;
+
+ assertEquals("hreflangLink","en",vhreflink);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement05</h2>
+<p>&lt;test name='HTMLAnchorElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The hreflang attribute contains the language code of the linked resource.
+
+ Retrieve the hreflang attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87358513">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87358513</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhreflink' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hreflang interface='HTMLAnchorElement' obj='testNode' var='vhreflink'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhreflink' expected='"en"' <a id="hreflangLink">id='hreflangLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement06.html
new file mode 100644
index 0000000000..e28bcbcdd5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute contains the anchor name.
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32783304
+*/
+function HTMLAnchorElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","Anchor",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement06</h2>
+<p>&lt;test name='HTMLAnchorElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute contains the anchor name.
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32783304">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32783304</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLAnchorElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"Anchor"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement07.html
new file mode 100644
index 0000000000..6780083dab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rel attribute contains the forward link type.
+
+ Retrieve the rel attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3815891
+*/
+function HTMLAnchorElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vrel;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vrel = testNode.rel;
+
+ assertEquals("relLink","GLOSSARY",vrel);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement07</h2>
+<p>&lt;test name='HTMLAnchorElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rel attribute contains the forward link type.
+
+ Retrieve the rel attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3815891">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3815891</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrel' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rel interface='HTMLAnchorElement' obj='testNode' var='vrel'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrel' expected='"GLOSSARY"' <a id="relLink">id='relLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement08.html
new file mode 100644
index 0000000000..7a615e662c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rev attribute contains the reverse link type
+
+ Retrieve the rev attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58259771
+*/
+function HTMLAnchorElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vrev;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vrev = testNode.rev;
+
+ assertEquals("revLink","STYLESHEET",vrev);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement08</h2>
+<p>&lt;test name='HTMLAnchorElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rev attribute contains the reverse link type
+
+ Retrieve the rev attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58259771">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58259771</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrev' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rev interface='HTMLAnchorElement' obj='testNode' var='vrev'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrev' expected='"STYLESHEET"' <a id="revLink">id='revLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement09.html
new file mode 100644
index 0000000000..30453216fe
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement09.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The shape attribute contains the shape of the active area.
+
+ Retrieve the shape attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808
+*/
+function HTMLAnchorElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vshape;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vshape = testNode.shape;
+
+ assertEquals("shapeLink","rect",vshape);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement09</h2>
+<p>&lt;test name='HTMLAnchorElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The shape attribute contains the shape of the active area.
+
+ Retrieve the shape attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vshape' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;shape interface='HTMLAnchorElement' obj='testNode' var='vshape'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vshape' expected='"rect"' <a id="shapeLink">id='shapeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement10.html
new file mode 100644
index 0000000000..8b377e7da9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement10.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute contains an index that represents the elements
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41586466
+*/
+function HTMLAnchorElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",22,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement10</h2>
+<p>&lt;test name='HTMLAnchorElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute contains an index that represents the elements
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41586466">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41586466</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLAnchorElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='22' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement11.html
new file mode 100644
index 0000000000..64e54da9b4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement11.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The target attribute specifies the frame to render the source in.
+
+ Retrieve the target attribute and examine it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6414197
+*/
+function HTMLAnchorElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vtarget;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor2");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtarget = testNode.target;
+
+ assertEquals("targetLink","dynamic",vtarget);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement11</h2>
+<p>&lt;test name='HTMLAnchorElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The target attribute specifies the frame to render the source in.
+
+ Retrieve the target attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6414197">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6414197</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtarget' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target interface='HTMLAnchorElement' obj='testNode' var='vtarget'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtarget' expected='"dynamic"' <a id="targetLink">id='targetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement12.html
new file mode 100644
index 0000000000..cf48f9dc99
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement12.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute contains the advisory content model.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221
+*/
+function HTMLAnchorElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","image/gif",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement12</h2>
+<p>&lt;test name='HTMLAnchorElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute contains the advisory content model.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLAnchorElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"image/gif"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement13.html
new file mode 100644
index 0000000000..750832dd47
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement13.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLAnchorElement.blur should surrender input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65068939
+*/
+function HTMLAnchorElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ testNode.blur();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement13</h2>
+<p>&lt;test name='HTMLAnchorElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLAnchorElement.blur should surrender input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65068939">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65068939</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;blur interface='HTMLAnchorElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement14.html
new file mode 100644
index 0000000000..7daee66eb2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAnchorElement14.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAnchorElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLAnchorElement.focus should capture input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47150313
+*/
+function HTMLAnchorElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLAnchorElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ testNode.focus();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAnchorElement14</h2>
+<p>&lt;test name='HTMLAnchorElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAnchorElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLAnchorElement.focus should capture input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47150313">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47150313</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='HTMLAnchorElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;focus interface='HTMLAnchorElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement01.html
new file mode 100644
index 0000000000..33cb668b00
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute specifies a single character access key to
+ give access to the control form.
+
+ Retrieve the accessKey attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457
+*/
+function HTMLAreaElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("alignLink","a",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement01</h2>
+<p>&lt;test name='HTMLAreaElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute specifies a single character access key to
+ give access to the control form.
+
+ Retrieve the accessKey attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLAreaElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"a"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement02.html
new file mode 100644
index 0000000000..c863149863
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The alt attribute specifies an alternate text for user agents not
+ rendering the normal content of this element.
+
+ Retrieve the alt attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39775416
+*/
+function HTMLAreaElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var valt;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valt = testNode.alt;
+
+ assertEquals("altLink","Domain",valt);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement02</h2>
+<p>&lt;test name='HTMLAreaElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The alt attribute specifies an alternate text for user agents not
+ rendering the normal content of this element.
+
+ Retrieve the alt attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39775416">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39775416</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valt' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;alt interface='HTMLAreaElement' obj='testNode' var='valt'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valt' expected='"Domain"' <a id="altLink">id='altLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement03.html
new file mode 100644
index 0000000000..fcfc102c6c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The coords attribute specifies a comma-seperated list of lengths,
+ defining an active region geometry.
+
+ Retrieve the coords attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476
+*/
+function HTMLAreaElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vcoords;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcoords = testNode.coords;
+
+ assertEquals("coordsLink","0,2,45,45",vcoords);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement03</h2>
+<p>&lt;test name='HTMLAreaElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The coords attribute specifies a comma-seperated list of lengths,
+ defining an active region geometry.
+
+ Retrieve the coords attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcoords' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;coords interface='HTMLAreaElement' obj='testNode' var='vcoords'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcoords' expected='"0,2,45,45"' <a id="coordsLink">id='coordsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement04.html
new file mode 100644
index 0000000000..fd2f9ed7a4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The href attribute specifies the URI of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34672936
+*/
+function HTMLAreaElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vhref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhref = testNode.href;
+
+ assertURIEquals("hrefLink",null,null,null,"dletter.html",null,null,null,null,vhref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement04</h2>
+<p>&lt;test name='HTMLAreaElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The href attribute specifies the URI of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34672936">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34672936</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhref' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;href interface='HTMLAreaElement' obj='testNode' var='vhref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vhref' file='"dletter.html"' <a id="hrefLink">id='hrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement05.html
new file mode 100644
index 0000000000..91f422ba57
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The noHref attribute specifies that this area is inactive.
+
+ Retrieve the noHref attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871
+*/
+function HTMLAreaElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vnohref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vnohref = testNode.noHref;
+
+ assertFalse("noHrefLink",vnohref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement05</h2>
+<p>&lt;test name='HTMLAreaElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The noHref attribute specifies that this area is inactive.
+
+ Retrieve the noHref attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnohref' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noHref interface='HTMLAreaElement' obj='testNode' var='vnohref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='vnohref' <a id="noHrefLink">id='noHrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement06.html
new file mode 100644
index 0000000000..4573ad5e9f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The shape attribute specifies the shape of the active area.
+
+ Retrieve the shape attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85683271
+*/
+function HTMLAreaElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vshape;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vshape = testNode.shape;
+
+ assertEquals("shapeLink","rect".toLowerCase(),vshape.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement06</h2>
+<p>&lt;test name='HTMLAreaElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The shape attribute specifies the shape of the active area.
+
+ Retrieve the shape attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85683271">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85683271</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vshape' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;shape interface='HTMLAreaElement' obj='testNode' var='vshape'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vshape' expected='"rect"' <a id="shapeLink">id='shapeLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement07.html
new file mode 100644
index 0000000000..51a20af37d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement07.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute specifies an index that represents the element's
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121
+*/
+function HTMLAreaElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",10,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement07</h2>
+<p>&lt;test name='HTMLAreaElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute specifies an index that represents the element's
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLAreaElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='10' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement08.html
new file mode 100644
index 0000000000..34beaca59b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLAreaElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLAreaElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The target specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46054682
+*/
+function HTMLAreaElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLAreaElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vtarget;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area2");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtarget = testNode.target;
+
+ assertEquals("targetLink","dynamic",vtarget);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLAreaElement08</h2>
+<p>&lt;test name='HTMLAreaElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLAreaElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The target specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46054682">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46054682</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtarget' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target interface='HTMLAreaElement' obj='testNode' var='vtarget'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtarget' expected='"dynamic"' <a id="targetLink">id='targetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBRElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBRElement01.html
new file mode 100644
index 0000000000..d214e9c4c3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBRElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBRElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBRElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "br");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The clear attribute specifies control flow of text around floats.
+
+ Retrieve the clear attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82703081
+*/
+function HTMLBRElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLBRElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vclear;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "br");
+ nodeList = doc.getElementsByTagName("br");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclear = testNode.clear;
+
+ assertEquals("clearLink","none",vclear);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBRElement01</h2>
+<p>&lt;test name='HTMLBRElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBRElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The clear attribute specifies control flow of text around floats.
+
+ Retrieve the clear attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82703081">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82703081</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclear' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='br' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"br"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;clear interface='HTMLBRElement' obj='testNode' var='vclear'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclear' expected='"none"' <a id="clearLink">id='clearLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/br.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement01.html
new file mode 100644
index 0000000000..b5301beb83
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBaseElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBaseElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "base");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The href attribute specifies the base URI.
+
+ Retrieve the href attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65382887
+*/
+function HTMLBaseElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLBaseElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vhref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "base");
+ nodeList = doc.getElementsByTagName("base");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhref = testNode.href;
+
+ assertEquals("hrefLink","about:blank",vhref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBaseElement01</h2>
+<p>&lt;test name='HTMLBaseElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBaseElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The href attribute specifies the base URI.
+
+ Retrieve the href attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65382887">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65382887</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhref' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='base' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"base"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;href interface='HTMLBaseElement' obj='testNode' var='vhref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhref' expected='"about:blank"' <a id="hrefLink">id='hrefLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/base.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement02.html
new file mode 100644
index 0000000000..c271e9565a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBaseElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBaseElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBaseElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "base2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The target attribute specifies the default target frame.
+
+ Retrieve the target attribute and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73844298
+*/
+function HTMLBaseElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLBaseElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vtarget;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "base2");
+ nodeList = doc.getElementsByTagName("base");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtarget = testNode.target;
+
+ assertEquals("targetLink","Frame1",vtarget);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBaseElement02</h2>
+<p>&lt;test name='HTMLBaseElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBaseElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The target attribute specifies the default target frame.
+
+ Retrieve the target attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73844298">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73844298</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtarget' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='base2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"base"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target interface='HTMLBaseElement' obj='testNode' var='vtarget'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtarget' expected='"Frame1"' <a id="targetLink">id='targetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/base2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement01.html
new file mode 100644
index 0000000000..3e1fa8e484
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The aLink attribute specifies the color of active links.
+
+ Retrieve the aLink attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581
+*/
+function HTMLBodyElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valink;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valink = testNode.aLink;
+
+ assertEquals("aLinkLink","#0000ff",valink);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement01</h2>
+<p>&lt;test name='HTMLBodyElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The aLink attribute specifies the color of active links.
+
+ Retrieve the aLink attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valink' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;aLink interface='HTMLBodyElement' obj='testNode' var='valink'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valink' expected='"#0000ff"' <a id="aLinkLink">id='aLinkLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement02.html
new file mode 100644
index 0000000000..1aaa2e3782
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement02.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The background attribute specifies the URI of the background texture
+ tile image.
+
+ Retrieve the background attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37574810
+*/
+function HTMLBodyElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vbackground;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vbackground = testNode.background;
+ assertEquals("backgroundLink","./pix/back1.gif",vbackground);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement02</h2>
+<p>&lt;test name='HTMLBodyElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The background attribute specifies the URI fo the background texture
+ tile image.
+
+ Retrieve the background attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37574810">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37574810</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbackground' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;background interface='HTMLBodyElement' obj='testNode' var='vbackground'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbackground' expected='"./pix/back1.gif"' <a id="backgroundLink">id='backgroundLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement03.html
new file mode 100644
index 0000000000..1cb2e6d2ff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The bgColor attribute specifies the document background color.
+
+ Retrieve the bgColor attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24940084
+*/
+function HTMLBodyElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgColorLink","#ffff00",vbgcolor);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement03</h2>
+<p>&lt;test name='HTMLBodyElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The bgColor attribute specifies the document background color.
+
+ Retrieve the bgColor attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24940084">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24940084</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLBodyElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#ffff00"' <a id="bgColorLink">id='bgColorLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement04.html
new file mode 100644
index 0000000000..313430d770
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The link attribute specifies the color of links that are not active
+ and unvisited.
+
+ Retrieve the link attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7662206
+*/
+function HTMLBodyElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vlink;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlink = testNode.link;
+
+ assertEquals("linkLink","#ff0000",vlink);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement04</h2>
+<p>&lt;test name='HTMLBodyElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The link attribute specifies the color of links that are not active
+ and unvisited.
+
+ Retrieve the link attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7662206">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7662206</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlink' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link interface='HTMLBodyElement' obj='testNode' var='vlink'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlink' expected='"#ff0000"' <a id="linkLink">id='linkLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement05.html
new file mode 100644
index 0000000000..b81ef57bc3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The text attribute specifies the document text color.
+
+ Retrieve the text attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73714763
+*/
+function HTMLBodyElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vtext;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtext = testNode.text;
+
+ assertEquals("textLink","#000000",vtext);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement05</h2>
+<p>&lt;test name='HTMLBodyElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The text attribute specifies the document text color.
+
+ Retrieve the text attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73714763">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73714763</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtext' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;text interface='HTMLBodyElement' obj='testNode' var='vtext'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtext' expected='"#000000"' <a id="textLink">id='textLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement06.html
new file mode 100644
index 0000000000..090cf5784c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLBodyElement06.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLBodyElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vLink attribute specifies the color of links that have been
+ visited by the user.
+
+ Retrieve the vLink attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83224305
+*/
+function HTMLBodyElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLBodyElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vvlink;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvlink = testNode.vLink;
+
+ assertEquals("vLinkLink","#00ffff",vvlink);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLBodyElement06</h2>
+<p>&lt;test name='HTMLBodyElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLBodyElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vLink attribute specifies the color of links that have been
+ visited by the user.
+
+ Retrieve the vLink attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83224305">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83224305</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvlink' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vLink interface='HTMLBodyElement' obj='testNode' var='vvlink'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvlink' expected='"#00ffff"' <a id="vLinkLink">id='vLinkLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement01.html
new file mode 100644
index 0000000000..a2671e0db7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement01.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+*/
+function HTMLButtonElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var fNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form2",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement01</h2>
+<p>&lt;test name='HTMLButtonElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form2"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement02.html
new file mode 100644
index 0000000000..6a5549ddc2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+*/
+function HTMLButtonElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement02</h2>
+<p>&lt;test name='HTMLButtonElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement03.html
new file mode 100644
index 0000000000..51d5ecdb0a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute returns a single character access key to
+ give access to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431
+*/
+function HTMLButtonElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","f",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement03</h2>
+<p>&lt;test name='HTMLButtonElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute returns a single character access key to
+ give access to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLButtonElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"f"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement04.html
new file mode 100644
index 0000000000..eb437b66e5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute specifies whether the control is unavailable
+ in this context.
+
+ Retrieve the disabled attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155
+*/
+function HTMLButtonElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement04</h2>
+<p>&lt;test name='HTMLButtonElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute specifies whether the control is unavailable
+ in this context.
+
+ Retrieve the disabled attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLButtonElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement05.html
new file mode 100644
index 0000000000..3dda0c1285
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute is the form control or object name when submitted
+ with a form.
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11029910
+*/
+function HTMLButtonElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","disabledButton",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement05</h2>
+<p>&lt;test name='HTMLButtonElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute is the form control or object name when submitted
+ with a form.
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11029910">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11029910</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLButtonElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"disabledButton"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement06.html
new file mode 100644
index 0000000000..a35ce44be9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement06.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute specifies an index that represents the element's
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908
+*/
+function HTMLButtonElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",20,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement06</h2>
+<p>&lt;test name='HTMLButtonElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute specifies an index that represents the element's
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLButtonElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='20' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement07.html
new file mode 100644
index 0000000000..121bd16258
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the type of button.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092
+*/
+function HTMLButtonElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","reset",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement07</h2>
+<p>&lt;test name='HTMLButtonElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the type of button.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLButtonElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"reset"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement08.html
new file mode 100644
index 0000000000..e3e688a6c8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLButtonElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLButtonElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute specifies the current control value.
+
+ Retrieve the value attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782
+*/
+function HTMLButtonElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLButtonElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink","Reset Disabled Button",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLButtonElement08</h2>
+<p>&lt;test name='HTMLButtonElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLButtonElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute specifies the current control value.
+
+ Retrieve the value attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLButtonElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"Reset Disabled Button"' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection01.html
new file mode 100644
index 0000000000..a9db5018a1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection01.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 0 is further
+ retrieved and its "rowIndex" attribute is examined.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
+*/
+function HTMLCollection01() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection01") != null) return;
+ var nodeList;
+ var testNode;
+ var rowNode;
+ var rowsnodeList;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowNode = rowsnodeList.item(0);
+ vrowindex = rowNode.rowIndex;
+
+ assertEquals("rowIndexLink",0,vrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection01</h2>
+<p>&lt;test name='HTMLCollection01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 0 is further
+ retrieved and its "rowIndex" attribute is examined.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='rowsnodeList' var='rowNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='rowNode' var='vrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowindex' expected='0' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection02.html
new file mode 100644
index 0000000000..250be450b6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection02.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements name attribute.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
+*/
+function HTMLCollection02() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection02") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ formNode = formsnodeList.namedItem("select1");
+ vname = formNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","SELECT",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection02</h2>
+<p>&lt;test name='HTMLCollection02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements name attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem obj='formsnodeList' var='formNode' name='"select1"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='formNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"SELECT"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection03.html
new file mode 100644
index 0000000000..4106a252f9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection03.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test id attribute).
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the "element" attribute. The first SELECT element is further retrieved
+ using the elements id.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
+*/
+function HTMLCollection03() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection03") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ formNode = formsnodeList.namedItem("selectId");
+ vname = formNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","select",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection03</h2>
+<p>&lt;test name='HTMLCollection03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test id attribute).
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the "element" attribute. The first SELECT element is further retrieved
+ using the elements id.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem obj='formsnodeList' var='formNode' name='"selectId"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='formNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"select"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection04.html
new file mode 100644
index 0000000000..1dd77c08d8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection04.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ HTMLCollections are live, they are automatically updated when the
+ underlying document is changed.
+
+ Create a HTMLCollection object by invoking the rows attribute of the
+ first TABLE element and examine its length, then add a new row and
+ re-examine the length.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551
+*/
+function HTMLCollection04() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection04") != null) return;
+ var nodeList;
+ var testNode;
+ var rowLength1;
+ var rowLength2;
+ var rowsnodeList;
+ var newRow;
+ var vrowindex;
+ var doc;
+ var result = new Array();
+
+ expectedResult = new Array();
+ expectedResult[0] = 4;
+ expectedResult[1] = 5;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowLength1 = rowsnodeList.length;
+
+ result[result.length] = rowLength1;
+newRow = testNode.insertRow(4);
+ rowLength2 = rowsnodeList.length;
+
+ result[result.length] = rowLength2;
+assertEqualsList("rowIndexLink",expectedResult,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection04</h2>
+<p>&lt;test name='HTMLCollection04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ HTMLCollections are live, they are automatically updated when the
+ underlying document is changed.
+
+ Create a HTMLCollection object by invoking the rows attribute of the
+ first TABLE element and examine its length, then add a new row and
+ re-examine the length.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowLength1' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowLength2' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedResult' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='rowLength1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='rowLength1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='rowLength2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='rowLength2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedResult' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection05.html
new file mode 100644
index 0000000000..9e5cbc4d75
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection05.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The length attribute specifies the length or size of the list.
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Retrieve the length attribute of the HTMLCollection
+ object.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551
+*/
+function HTMLCollection05() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection05") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var rowLength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowLength = rowsnodeList.length;
+
+ assertEquals("rowIndexLink",4,rowLength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection05</h2>
+<p>&lt;test name='HTMLCollection05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The length attribute specifies the length or size of the list.
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Retrieve the length attribute of the HTMLCollection
+ object.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40057551</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='rowLength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='rowLength' expected='4' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection06.html
new file mode 100644
index 0000000000..065f33a9a4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection06.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An item(index) method retrieves an item specified by ordinal index
+ (Test for index=0).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 0 is further
+ retrieved and its "rowIndex" attribute is examined.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
+*/
+function HTMLCollection06() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection06") != null) return;
+ var nodeList;
+ var testNode;
+ var rowNode;
+ var rowsnodeList;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowNode = rowsnodeList.item(0);
+ vrowindex = rowNode.rowIndex;
+
+ assertEquals("rowIndexLink",0,vrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection06</h2>
+<p>&lt;test name='HTMLCollection06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An item(index) method retrieves an item specified by ordinal index
+ (Test for index=0).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 0 is further
+ retrieved and its "rowIndex" attribute is examined.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='rowsnodeList' var='rowNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='rowNode' var='vrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowindex' expected='0' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection07.html
new file mode 100644
index 0000000000..6bf2f46144
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection07.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An item(index) method retrieves an item specified by ordinal index
+ (Test for index=3).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 3 is further
+ retrieved and its "rowIndex" attribute is examined.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
+*/
+function HTMLCollection07() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection07") != null) return;
+ var nodeList;
+ var testNode;
+ var rowNode;
+ var rowsnodeList;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowNode = rowsnodeList.item(3);
+ vrowindex = rowNode.rowIndex;
+
+ assertEquals("rowIndexLink",3,vrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection07</h2>
+<p>&lt;test name='HTMLCollection07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An item(index) method retrieves an item specified by ordinal index
+ (Test for index=3).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. The item located at ordinal index 3 is further
+ retrieved and its "rowIndex" attribute is examined.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='rowsnodeList' var='rowNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='rowNode' var='vrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowindex' expected='3' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection08.html
new file mode 100644
index 0000000000..3a808d8246
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection08.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ Nodes in a HTMLCollection object are numbered in tree order.
+ (Depth-first traversal order).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Access the item in the third ordinal index. The
+ resulting rowIndex attribute is examined and should be two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
+*/
+function HTMLCollection08() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection08") != null) return;
+ var nodeList;
+ var testNode;
+ var rowNode;
+ var rowsnodeList;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowNode = rowsnodeList.item(2);
+ vrowindex = rowNode.rowIndex;
+
+ assertEquals("rowIndexLink",2,vrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection08</h2>
+<p>&lt;test name='HTMLCollection08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ Nodes in a HTMLCollection object are numbered in tree order.
+ (Depth-first traversal order).
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Access the item in the third ordinal index. The
+ resulting rowIndex attribute is examined and should be two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='rowsnodeList' var='rowNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='rowNode' var='vrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowindex' expected='2' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection09.html
new file mode 100644
index 0000000000..dc68289b4c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection09.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The item(index) method returns null if the index is out of range.
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Invoke the item(index) method with an index
+ of 5. This index is out of range and should return null.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535
+*/
+function HTMLCollection09() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection09") != null) return;
+ var nodeList;
+ var testNode;
+ var rowNode;
+ var rowsnodeList;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ rowNode = rowsnodeList.item(5);
+ assertNull("rowIndexLink",rowNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection09</h2>
+<p>&lt;test name='HTMLCollection09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The item(index) method returns null if the index is out of range.
+
+ Retrieve the first TABLE element and create a HTMLCollection by invoking
+ the "rows" attribute. Invoke the item(index) method with an index
+ of 5. This index is out of range and should return null.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33262535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='rowsnodeList' var='rowNode' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='rowNode' <a id="rowIndexLink">id='rowIndexLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection10.html
new file mode 100644
index 0000000000..13f4ea3753
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection10.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements name attribute since the id attribute doesn't match.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
+*/
+function HTMLCollection10() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection10") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ formNode = formsnodeList.namedItem("select1");
+ vname = formNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","SELECT",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection10</h2>
+<p>&lt;test name='HTMLCollection10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements name attribute since the id attribute doesn't match.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem obj='formsnodeList' var='formNode' name='"select1"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='formNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"SELECT"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection11.html
new file mode 100644
index 0000000000..226c6e35c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection11.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements id attribute.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
+*/
+function HTMLCollection11() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection11") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ formNode = formsnodeList.namedItem("selectId");
+ vname = formNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","select",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection11</h2>
+<p>&lt;test name='HTMLCollection11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The first SELECT element is further retrieved
+ using the elements id attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem obj='formsnodeList' var='formNode' name='"selectId"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='formNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"select"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLCollection12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection12.html
new file mode 100644
index 0000000000..f19b0b4a9c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLCollection12.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLCollection12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "collection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute. If there isn't
+ a matching node the method returns null.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The method returns null since there is not a
+ match of the name or id attribute.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976
+*/
+function HTMLCollection12() {
+ var success;
+ if(checkInitialization(builder, "HTMLCollection12") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var formsnodeList;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "collection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ formNode = formsnodeList.namedItem("select9");
+ assertNull("nameIndexLink",formNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLCollection12</h2>
+<p>&lt;test name='HTMLCollection12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLCollection12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The namedItem(name) method retrieves a node using a name. It first
+ searches for a node with a matching id attribute. If it doesn't find
+ one, it then searches for a Node with a matching name attribute, but only
+ on those elements that are allowed a name attribute. If there isn't
+ a matching node the method returns null.
+
+ Retrieve the first FORM element and create a HTMLCollection by invoking
+ the elements attribute. The method returns null since there is not a
+ match of the name or id attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21069976</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='collection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem obj='formsnodeList' var='formNode' name='"select9"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='formNode' <a id="nameIndexLink">id='nameIndexLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/collection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDirectoryElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDirectoryElement01.html
new file mode 100644
index 0000000000..d83de76aff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDirectoryElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDirectoryElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDirectoryElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "directory");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75317739
+*/
+function HTMLDirectoryElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLDirectoryElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "directory");
+ nodeList = doc.getElementsByTagName("dir");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDirectoryElement01</h2>
+<p>&lt;test name='HTMLDirectoryElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDirectoryElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75317739">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75317739</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='directory' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dir"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLDirectoryElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/directory.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDivElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDivElement01.html
new file mode 100644
index 0000000000..6e345f6955
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDivElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDivElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDivElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "div");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70908791
+*/
+function HTMLDivElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLDivElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "div");
+ nodeList = doc.getElementsByTagName("div");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDivElement01</h2>
+<p>&lt;test name='HTMLDivElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDivElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70908791">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70908791</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='div' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"div"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLDivElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/div.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDlistElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDlistElement01.html
new file mode 100644
index 0000000000..3d537a71c1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDlistElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDlistElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDlistElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "dl");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539
+*/
+function HTMLDlistElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLDlistElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "dl");
+ nodeList = doc.getElementsByTagName("dl");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDlistElement01</h2>
+<p>&lt;test name='HTMLDlistElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDListElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='dl' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dl"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLDListElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/dl.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument01.html
new file mode 100644
index 0000000000..b5a1e2bbf7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument01.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute is the specified title as a string.
+
+ Retrieve the title attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827
+*/
+function HTMLDocument01() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument01") != null) return;
+ var nodeList;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vtitle = doc.title;
+
+ assertEquals("titleLink","NIST DOM HTML Test - DOCUMENT",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument01</h2>
+<p>&lt;test name='HTMLDocument01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute is the specified title as a string.
+
+ Retrieve the title attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLDocument' obj='doc' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NIST DOM HTML Test - DOCUMENT"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument02.html
new file mode 100644
index 0000000000..274877d02c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument02.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The referrer attribute returns the URI of the page that linked to this
+ page.
+
+ Retrieve the referrer attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95229140
+*/
+function HTMLDocument02() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument02") != null) return;
+ var nodeList;
+ var testNode;
+ var vreferrer;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vreferrer = doc.referrer;
+
+ // assertEquals("referrerLink","",vreferrer);
+ // Its not sure that this test is valid.
+ // webkit also fails this
+ // http://svn.webkit.org/repository/webkit/trunk/LayoutTests/dom/html/level2/html/HTMLDocument02.html
+ todo_is(vreferrer,"","referrerLink");
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument02</h2>
+<p>&lt;test name='HTMLDocument02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The referrer attribute returns the URI of the page that linked to this
+ page.
+
+ Retrieve the referrer attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95229140">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95229140</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vreferrer' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;referrer interface='HTMLDocument' obj='doc' var='vreferrer'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vreferrer' expected='""' <a id="referrerLink">id='referrerLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument03.html
new file mode 100644
index 0000000000..b3036dfff2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument03.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The domain attribute specifies the domain name of the server that served
+ the document, or null if the server cannot be identified by a domain name.
+
+ Retrieve the domain attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2250147
+*/
+function HTMLDocument03() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument03") != null) return;
+ var nodeList;
+ var testNode;
+ var vdomain;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vdomain = doc.domain;
+
+ assertEquals("domainLink","mochi.test",vdomain);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument03</h2>
+<p>&lt;test name='HTMLDocument03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The domain attribute specifies the domain name of the server that served
+ the document, or null if the server cannot be identified by a domain name.
+
+ Retrieve the domain attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2250147">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2250147</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdomain' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;domain interface='HTMLDocument' obj='doc' var='vdomain'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdomain' expected='""' <a id="domainLink">id='domainLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument04.html
new file mode 100644
index 0000000000..ea6cd77bd0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument04.html
@@ -0,0 +1,132 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The URL attribute specifies the absolute URI of the document.
+
+ Retrieve the URL attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46183437
+*/
+function HTMLDocument04() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument04") != null) return;
+ var nodeList;
+ var testNode;
+ var vurl;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vurl = doc.URL;
+
+ assertURIEquals("URLLink",null,null,null,null,"document",null,null,true,vurl);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument04</h2>
+<p>&lt;test name='HTMLDocument04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The URL attribute specifies the absolute URI of the document.
+
+ Retrieve the URL attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46183437">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46183437</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vurl' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;URL interface='HTMLDocument' obj='doc' var='vurl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vurl' name='"document"' <a id="URLLink">id='URLLink'</a> isAbsolute='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument05.html
new file mode 100644
index 0000000000..942c8c914f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The body attribute is the element that contains the content for the
+ document.
+
+ Retrieve the body attribute and examine its value for the id attribute.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56360201
+*/
+function HTMLDocument05() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument05") != null) return;
+ var nodeList;
+ var testNode;
+ var vbody;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vbody = doc.body;
+
+ vid = vbody.id;
+
+ assertEquals("idLink","TEST-BODY",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument05</h2>
+<p>&lt;test name='HTMLDocument05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The body attribute is the element that contains the content for the
+ document.
+
+ Retrieve the body attribute and examine its value for the id attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56360201">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56360201</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbody' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;body interface='HTMLDocument' obj='doc' var='vbody'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='vbody' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"TEST-BODY"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument07.html
new file mode 100644
index 0000000000..82f8a6cae3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The images attribute returns a collection of all IMG elements in a document.
+
+ Retrieve the images attribute from the document and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90379117
+*/
+function HTMLDocument07() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument07") != null) return;
+ var nodeList;
+ var testNode;
+ var vimages;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vimages = doc.images;
+
+ vlength = vimages.length;
+
+ assertEquals("lengthLink",1,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument07</h2>
+<p>&lt;test name='HTMLDocument07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The images attribute returns a collection of all IMG elements in a document.
+
+ Retrieve the images attribute from the document and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90379117">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90379117</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vimages' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;images interface='HTMLDocument' obj='doc' var='vimages'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vimages' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='1' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument09.html
new file mode 100644
index 0000000000..bab6a50f0a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The links attribute returns a collection of all AREA and A elements
+ in a document with a value for the href attribute.
+
+ Retrieve the links attribute from the document and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7068919
+*/
+function HTMLDocument09() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument09") != null) return;
+ var nodeList;
+ var testNode;
+ var vlinks;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vlinks = doc.links;
+
+ vlength = vlinks.length;
+
+ assertEquals("lengthLink",3,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument09</h2>
+<p>&lt;test name='HTMLDocument09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The links attribute returns a collection of all AREA and A elements
+ in a document with a value for the href attribute.
+
+ Retrieve the links attribute from the document and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7068919">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7068919</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlinks' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;links interface='HTMLDocument' obj='doc' var='vlinks'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vlinks' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='3' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument10.html
new file mode 100644
index 0000000000..c9b128b99e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument10.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The forms attribute returns a collection of all the forms in a document.
+
+ Retrieve the forms attribute from the document and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1689064
+*/
+function HTMLDocument10() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument10") != null) return;
+ var nodeList;
+ var testNode;
+ var vforms;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vforms = doc.forms;
+
+ vlength = vforms.length;
+
+ assertEquals("lengthLink",1,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument10</h2>
+<p>&lt;test name='HTMLDocument10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The forms attribute returns a collection of all the forms in a document.
+
+ Retrieve the forms attribute from the document and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1689064">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1689064</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vforms' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;forms interface='HTMLDocument' obj='doc' var='vforms'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vforms' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='1' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument11.html
new file mode 100644
index 0000000000..58dee1d5d9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument11.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The anchors attribute returns a collection of all A elements with values
+ for the name attribute.
+
+ Retrieve the anchors attribute from the document and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7577272
+*/
+function HTMLDocument11() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument11") != null) return;
+ var nodeList;
+ var testNode;
+ var vanchors;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vanchors = doc.anchors;
+
+ vlength = vanchors.length;
+
+ assertEquals("lengthLink",1,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument11</h2>
+<p>&lt;test name='HTMLDocument11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The anchors attribute returns a collection of all A elements with values
+ for the name attribute.
+
+ Retrieve the anchors attribute from the document and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7577272">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7577272</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vanchors' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;anchors interface='HTMLDocument' obj='doc' var='vanchors'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vanchors' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='1' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument12.html
new file mode 100644
index 0000000000..0788ec7b3f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument12.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+
+<!--
+This test relies on that no cookies exist when the test starts.
+If this test is failing, add code to clear all cookies to the beginning of the test.
+-->
+
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cookie attribute returns the cookies associated with this document.
+
+ Retrieve the cookie attribute and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8747038
+*/
+function HTMLDocument12() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument12") != null) return;
+ var nodeList;
+ var vcookie;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ vcookie = doc.cookie;
+
+ assertEquals("cookieLink","",vcookie);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument12</h2>
+<p>&lt;test name='HTMLDocument12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cookie attribute returns the cookies associated with this document.
+
+ Retrieve the cookie attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-04-30&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8747038">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8747038</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcookie' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cookie interface='HTMLDocument' obj='doc' var='vcookie'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcookie' expected='""' <a id="cookieLink">id='cookieLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument13.html
new file mode 100644
index 0000000000..5ccb3fdd41
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument13.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The getElementsByName method returns the (possibly empty) collection
+ of elements whose name value is given by the elementName.
+
+ Retrieve all the elements whose name attribute is "mapid".
+ Check the length of the nodelist. It should be 1.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259
+*/
+function HTMLDocument13() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument13") != null) return;
+ var nodeList;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ nodeList = doc.getElementsByName("mapid");
+ assertSize("Asize",1,nodeList);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument13</h2>
+<p>&lt;test name='HTMLDocument13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The getElementsByName method returns the (possibly empty) collection
+ of elements whose name value is given by the elementName.
+
+ Retrieve all the elements whose name attribute is "mapid".
+ Check the length of the nodelist. It should be 1.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByName interface='HTMLDocument' var='nodeList' obj='doc' elementName='"mapid"' <a id="getElementsNameId">id='getElementsNameId'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument14.html
new file mode 100644
index 0000000000..a0e0080cdc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument14.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The getElementsByName method returns the (possibly empty) collection
+ of elements whose name value is given by the elementName.
+
+ Retrieve all the elements whose name attribute is "noid".
+ Check the length of the nodelist. It should be 0 since
+ the id "noid" does not exist.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259
+*/
+function HTMLDocument14() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument14") != null) return;
+ var nodeList;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ nodeList = doc.getElementsByName("noid");
+ assertSize("Asize",0,nodeList);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument14</h2>
+<p>&lt;test name='HTMLDocument14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The getElementsByName method returns the (possibly empty) collection
+ of elements whose name value is given by the elementName.
+
+ Retrieve all the elements whose name attribute is "noid".
+ Check the length of the nodelist. It should be 0 since
+ the id "noid" does not exist.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71555259</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByName interface='HTMLDocument' var='nodeList' obj='doc' elementName='"noid"' <a id="getElementsNameId">id='getElementsNameId'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='0' <a id="Asize">id='Asize'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument15.html
new file mode 100644
index 0000000000..b5e8940dd6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument15.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The getElementById method returns the Element whose id is given by
+ elementId. If no such element exists, returns null.
+
+ Retrieve the element whose id is "mapid".
+ Check the value of the element.
+
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId
+*/
+function HTMLDocument15() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument15") != null) return;
+ var elementNode;
+ var elementValue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ elementNode = doc.getElementById("mapid");
+ elementValue = elementNode.nodeName;
+
+ assertEqualsAutoCase("element", "elementId","map",elementValue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument15</h2>
+<p>&lt;test name='HTMLDocument15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The getElementById method returns the Element whose id is given by
+ elementId. If no such element exists, returns null.
+
+ Retrieve the element whose id is "mapid".
+ Check the value of the element.
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='elementNode' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='elementValue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementById var='elementNode' obj='doc' elementId='"mapid"' <a id="getElementsId">id='getElementsId'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='elementNode' var='elementValue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='elementValue' expected='"map"' <a id="elementId">id='elementId'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument16.html
new file mode 100644
index 0000000000..98946ccd49
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument16.html
@@ -0,0 +1,142 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The getElementById method returns the Element whose id is given by
+ elementId. If no such element exists, returns null.
+
+ Retrieve the element whose id is "noid".
+ The value returned should be null since there are not any elements with
+ an id of "noid".
+
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId
+*/
+function HTMLDocument16() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument16") != null) return;
+ var elementNode;
+ var elementValue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ elementNode = doc.getElementById("noid");
+ assertNull("elementId",elementNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument16</h2>
+<p>&lt;test name='HTMLDocument16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The getElementById method returns the Element whose id is given by
+ elementId. If no such element exists, returns null.
+
+ Retrieve the element whose id is "noid".
+ The value returned should be null since there are not any elements with
+ an id of "noid".
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36113835</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-26809268</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-getElBId</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='elementNode' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='elementValue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementById var='elementNode' obj='doc' elementId='"noid"' <a id="getElementsId">id='getElementsId'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='elementNode' <a id="elementId">id='elementId'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument17.html
new file mode 100644
index 0000000000..e922831ad4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument17.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Clears the current document using HTMLDocument.open immediately followed by close.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
+*/
+function HTMLDocument17() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument17") != null) return;
+ var doc;
+ var bodyElem;
+ var bodyChild;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ doc.open();
+ doc.close();
+ bodyElem = doc.body;
+
+
+ if(
+
+ (bodyElem != null)
+
+ ) {
+ bodyChild = bodyElem.firstChild;
+
+ assertNull("bodyContainsChildren",bodyChild);
+
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument17</h2>
+<p>&lt;test name='HTMLDocument17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Clears the current document using HTMLDocument.open immediately followed by close.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='bodyElem' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='bodyChild' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;open obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;close obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;body var='bodyElem' obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;notNull obj='bodyElem'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' var='bodyChild' obj='bodyElem'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='bodyChild' <a id="bodyContainsChildren">id='bodyContainsChildren'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/if&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument18.html
new file mode 100644
index 0000000000..737f79ad8a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument18.html
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Calls HTMLDocument.close on a document that has not been opened for modification.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
+*/
+function HTMLDocument18() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument18") != null) return;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ doc.close();
+
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ ok(true, "Test complete");
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument18</h2>
+<p>&lt;test name='HTMLDocument18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Calls HTMLDocument.close on a document that has not been opened for modification.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;close obj='doc'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument19.html
new file mode 100644
index 0000000000..c7a67609db
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument19.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Replaces the current document with a valid HTML document using HTMLDocument.open, write and close.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634
+*/
+function HTMLDocument19() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument19") != null) return;
+ var doc;
+ var docElem;
+ var title;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ doc.open();
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ doc.write("&lt;html>");
+
+ }
+
+ else {
+ doc.write("&lt;html xmlns='http://www.w3.org/1999/xhtml'>");
+
+ }
+ doc.write("&lt;body>");
+ doc.write("&lt;title>Replacement&lt;/title>");
+ doc.write("&lt;/body>");
+ doc.write("&lt;p>");
+ doc.write("Hello, World.");
+ doc.write("&lt;/p>");
+ doc.write("&lt;/body>");
+ doc.write("&lt;/html>");
+ doc.close();
+
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ ok(true, "Test complete");
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument19</h2>
+<p>&lt;test name='HTMLDocument19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Replaces the current document with a valid HTML document using HTMLDocument.open, write and close.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='docElem' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='title' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;open obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentType type='text/html'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;html xmlns='http://www.w3.org/1999/xhtml'&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;title&gt;Replacement&lt;/title&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;p&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;/p&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;/html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;close obj='doc'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument20.html
new file mode 100644
index 0000000000..81dbb8a10f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument20.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Replaces the current document with a valid HTML document using HTMLDocument.open, writeln and close.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390
+*/
+function HTMLDocument20() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument20") != null) return;
+ var doc;
+ var docElem;
+ var title;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ doc.open();
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ doc.writeln("&lt;html>");
+
+ }
+
+ else {
+ doc.writeln("&lt;html xmlns='http://www.w3.org/1999/xhtml'>");
+
+ }
+ doc.writeln("&lt;body>");
+ doc.writeln("&lt;title>Replacement&lt;/title>");
+ doc.writeln("&lt;/body>");
+ doc.writeln("&lt;p>");
+ doc.writeln("Hello, World.");
+ doc.writeln("&lt;/p>");
+ doc.writeln("&lt;/body>");
+ doc.writeln("&lt;/html>");
+ doc.close();
+
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ ok(true, "Test complete");
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument20</h2>
+<p>&lt;test name='HTMLDocument20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Replaces the current document with a valid HTML document using HTMLDocument.open, writeln and close.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='docElem' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='title' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;open obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentType type='text/html'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;html xmlns='http://www.w3.org/1999/xhtml'&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;title&gt;Replacement&lt;/title&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;p&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/p&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;close obj='doc'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLDocument21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument21.html
new file mode 100644
index 0000000000..cd6d9a5a7b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLDocument21.html
@@ -0,0 +1,162 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLDocument21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "document");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Replaces the current document checks that writeln adds a new line.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390
+*/
+function HTMLDocument21() {
+ var success;
+ if(checkInitialization(builder, "HTMLDocument21") != null) return;
+ var doc;
+ var docElem;
+ var preElems;
+ var preElem;
+ var preText;
+ var preValue;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "document");
+ doc.open();
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ doc.writeln("&lt;html>");
+
+ }
+
+ else {
+ doc.writeln("&lt;html xmlns='http://www.w3.org/1999/xhtml'>");
+
+ }
+ doc.writeln("&lt;body>");
+ doc.writeln("&lt;title>Replacement&lt;/title>");
+ doc.writeln("&lt;/body>");
+ doc.write("&lt;pre>");
+ doc.writeln("Hello, World.");
+ doc.writeln("Hello, World.");
+ doc.writeln("&lt;/pre>");
+ doc.write("&lt;pre>");
+ doc.write("Hello, World.");
+ doc.write("Hello, World.");
+ doc.writeln("&lt;/pre>");
+ doc.writeln("&lt;/body>");
+ doc.writeln("&lt;/html>");
+ doc.close();
+
+ // Ensure at least one SimpleTest check is reported. (Bug 483992)
+ ok(true, "Test complete");
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLDocument21</h2>
+<p>&lt;test name='HTMLDocument21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLDocument21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Replaces the current document checks that writeln adds a new line.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72161170</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98948567</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75233634</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35318390</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='docElem' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='preElems' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='preElem' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='preText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='preValue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='document' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;open obj='doc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentType type='text/html'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;html xmlns='http://www.w3.org/1999/xhtml'&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/else&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;title&gt;Replacement&lt;/title&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;pre&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/pre&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"&lt;pre&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;write obj='doc' text='"Hello, World."'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/pre&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/body&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;writeln obj='doc' text='"&lt;/html&gt;"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;close obj='doc'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/document.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement01.html
new file mode 100644
index 0000000000..33f5659ea2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the HEAD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("head");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-HEAD",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement01</h2>
+<p>&lt;test name='HTMLElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the HEAD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"head"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-HEAD"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement02.html
new file mode 100644
index 0000000000..b3e0d001d3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SUB element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sub");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-SUB",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement02</h2>
+<p>&lt;test name='HTMLElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SUB element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sub"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-SUB"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement03.html
new file mode 100644
index 0000000000..154524f9da
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SUP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-SUP",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement03</h2>
+<p>&lt;test name='HTMLElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SUP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-SUP"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement04.html
new file mode 100644
index 0000000000..99c4255625
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SPAN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("span");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-SPAN",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement04</h2>
+<p>&lt;test name='HTMLElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SPAN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"span"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-SPAN"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement05.html
new file mode 100644
index 0000000000..5365551c11
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the BDO element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("bdo");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-BDO",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement05</h2>
+<p>&lt;test name='HTMLElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the BDO element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"bdo"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-BDO"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement06.html
new file mode 100644
index 0000000000..c4390b512b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the TT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("tt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-TT",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement06</h2>
+<p>&lt;test name='HTMLElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the TT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-TT"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement07.html
new file mode 100644
index 0000000000..7ccf12b5e7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the I element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("i");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-I",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement07</h2>
+<p>&lt;test name='HTMLElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the I element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"i"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-I"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement08.html
new file mode 100644
index 0000000000..8738e2cdf2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the B element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("b");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-B",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement08</h2>
+<p>&lt;test name='HTMLElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the B element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"b"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-B"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement09.html
new file mode 100644
index 0000000000..42ed5bd096
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement09.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the U element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("u");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-U",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement09</h2>
+<p>&lt;test name='HTMLElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the U element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"u"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-U"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement10.html
new file mode 100644
index 0000000000..dee669c99d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement10.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the S element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("s");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-S",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement10</h2>
+<p>&lt;test name='HTMLElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the S element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"s"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-S"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement100.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement100.html
new file mode 100644
index 0000000000..b8ca6a8daa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement100.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement100</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement100'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SMALL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement100() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement100") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("small");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement100</h2>
+<p>&lt;test name='HTMLElement100' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement100&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SMALL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"small"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement101.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement101.html
new file mode 100644
index 0000000000..8162c4ce0d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement101.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement101</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement101'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the EM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement101() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement101") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("em");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement101</h2>
+<p>&lt;test name='HTMLElement101' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement101&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the EM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"em"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement102.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement102.html
new file mode 100644
index 0000000000..9a987c9455
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement102.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement102</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement102'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the STRONG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement102() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement102") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strong");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement102</h2>
+<p>&lt;test name='HTMLElement102' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement102&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the STRONG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strong"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement103.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement103.html
new file mode 100644
index 0000000000..d1aa2e053c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement103.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement103</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement103'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DFN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement103() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement103") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dfn");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement103</h2>
+<p>&lt;test name='HTMLElement103' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement103&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DFN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dfn"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement104.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement104.html
new file mode 100644
index 0000000000..2aa66e4d34
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement104.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement104</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement104'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CODE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement104() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement104") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("code");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement104</h2>
+<p>&lt;test name='HTMLElement104' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement104&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CODE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"code"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement105.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement105.html
new file mode 100644
index 0000000000..a7fd6bcb0a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement105.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement105</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement105'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SAMP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement105() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement105") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("samp");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement105</h2>
+<p>&lt;test name='HTMLElement105' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement105&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SAMP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"samp"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement106.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement106.html
new file mode 100644
index 0000000000..93cc16acdf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement106.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement106</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement106'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the KBD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement106() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement106") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("kbd");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement106</h2>
+<p>&lt;test name='HTMLElement106' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement106&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the KBD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"kbd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement107.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement107.html
new file mode 100644
index 0000000000..1de43c43dc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement107.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement107</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement107'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the VAR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement107() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement107") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("var");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement107</h2>
+<p>&lt;test name='HTMLElement107' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement107&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the VAR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"var"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement108.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement108.html
new file mode 100644
index 0000000000..34549391e1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement108.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement108</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement108'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CITE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement108() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement108") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("cite");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement108</h2>
+<p>&lt;test name='HTMLElement108' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement108&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CITE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"cite"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement109.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement109.html
new file mode 100644
index 0000000000..9173777d56
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement109.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement109</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement109'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ACRONYM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement109() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement109") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("acronym");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement109</h2>
+<p>&lt;test name='HTMLElement109' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement109&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ACRONYM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"acronym"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement11.html
new file mode 100644
index 0000000000..cc7bb65547
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement11.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the STRIKE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strike");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-STRIKE",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement11</h2>
+<p>&lt;test name='HTMLElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the STRIKE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strike"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-STRIKE"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement110.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement110.html
new file mode 100644
index 0000000000..8acf8ce736
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement110.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement110</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement110'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ABBR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement110() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement110") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("abbr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement110</h2>
+<p>&lt;test name='HTMLElement110' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement110&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ABBR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"abbr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement111.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement111.html
new file mode 100644
index 0000000000..8a4105f4cd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement111.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement111</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement111'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement111() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement111") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dd");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement111</h2>
+<p>&lt;test name='HTMLElement111' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement111&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement112.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement112.html
new file mode 100644
index 0000000000..091c72bdf3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement112.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement112</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement112'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement112() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement112") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement112</h2>
+<p>&lt;test name='HTMLElement112' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement112&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the DT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement113.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement113.html
new file mode 100644
index 0000000000..ab360118a8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement113.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement113</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement113'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the NOFRAMES element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement113() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement113") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noframes");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement113</h2>
+<p>&lt;test name='HTMLElement113' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement113&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the NOFRAMES element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noframes"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement114.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement114.html
new file mode 100644
index 0000000000..7dc20c8941
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement114.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement114</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement114'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the NOSCRIPT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement114() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement114") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noscript");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement114</h2>
+<p>&lt;test name='HTMLElement114' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement114&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the NOSCRIPT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noscript"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement115.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement115.html
new file mode 100644
index 0000000000..8e56fd081a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement115.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement115</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement115'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ADDRESS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement115() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement115") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("address");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement115</h2>
+<p>&lt;test name='HTMLElement115' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement115&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the ADDRESS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"address"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement116.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement116.html
new file mode 100644
index 0000000000..68961a6071
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement116.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement116</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement116'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CENTER element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement116() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement116") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("center");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement116</h2>
+<p>&lt;test name='HTMLElement116' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement116&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the CENTER element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"center"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement117.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement117.html
new file mode 100644
index 0000000000..69d1299219
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement117.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement117</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement117'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the HEAD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement117() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement117") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("head");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","HEAD-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement117</h2>
+<p>&lt;test name='HTMLElement117' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement117&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the HEAD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"head"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"HEAD-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement118.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement118.html
new file mode 100644
index 0000000000..d386dd4051
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement118.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement118</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement118'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SUB element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement118() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement118") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sub");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","SUB-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement118</h2>
+<p>&lt;test name='HTMLElement118' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement118&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SUB element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sub"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"SUB-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement119.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement119.html
new file mode 100644
index 0000000000..426000c4c7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement119.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement119</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement119'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SUP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement119() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement119") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","SUP-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement119</h2>
+<p>&lt;test name='HTMLElement119' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement119&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SUP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"SUP-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement12.html
new file mode 100644
index 0000000000..b71fbb4414
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement12.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the BIG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("big");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-BIG",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement12</h2>
+<p>&lt;test name='HTMLElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the BIG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"big"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-BIG"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement120.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement120.html
new file mode 100644
index 0000000000..d947b07426
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement120.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement120</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement120'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SPAN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement120() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement120") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("span");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","SPAN-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement120</h2>
+<p>&lt;test name='HTMLElement120' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement120&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SPAN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"span"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"SPAN-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement121.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement121.html
new file mode 100644
index 0000000000..b4beea87cd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement121.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement121</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement121'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the BDO element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement121() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement121") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("bdo");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","BDO-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement121</h2>
+<p>&lt;test name='HTMLElement121' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement121&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the BDO element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"bdo"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"BDO-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement122.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement122.html
new file mode 100644
index 0000000000..e5da51a91c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement122.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement122</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement122'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the TT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement122() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement122") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("tt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","TT-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement122</h2>
+<p>&lt;test name='HTMLElement122' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement122&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the TT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"TT-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement123.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement123.html
new file mode 100644
index 0000000000..e2bec40d6f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement123.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement123</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement123'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the I element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement123() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement123") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("i");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","I-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement123</h2>
+<p>&lt;test name='HTMLElement123' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement123&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the I element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"i"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"I-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement124.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement124.html
new file mode 100644
index 0000000000..03d51cb312
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement124.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement124</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement124'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the B element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement124() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement124") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("b");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","B-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement124</h2>
+<p>&lt;test name='HTMLElement124' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement124&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the B element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"b"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"B-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement125.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement125.html
new file mode 100644
index 0000000000..7ca302486a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement125.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement125</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement125'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the U element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement125() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement125") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("u");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","U-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement125</h2>
+<p>&lt;test name='HTMLElement125' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement125&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the U element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"u"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"U-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement126.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement126.html
new file mode 100644
index 0000000000..512100c986
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement126.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement126</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement126'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the S element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement126() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement126") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("s");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","S-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement126</h2>
+<p>&lt;test name='HTMLElement126' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement126&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the S element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"s"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"S-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement127.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement127.html
new file mode 100644
index 0000000000..ce9589a053
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement127.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement127</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement127'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the STRIKE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement127() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement127") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strike");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","STRIKE-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement127</h2>
+<p>&lt;test name='HTMLElement127' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement127&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the STRIKE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strike"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"STRIKE-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement128.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement128.html
new file mode 100644
index 0000000000..93a8c76b48
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement128.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement128</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement128'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the BIG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement128() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement128") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("big");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","BIG-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement128</h2>
+<p>&lt;test name='HTMLElement128' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement128&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the BIG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"big"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"BIG-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement129.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement129.html
new file mode 100644
index 0000000000..f0ff2117dc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement129.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement129</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement129'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SMALL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement129() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement129") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("small");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","SMALL-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement129</h2>
+<p>&lt;test name='HTMLElement129' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement129&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SMALL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"small"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"SMALL-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement13.html
new file mode 100644
index 0000000000..166b0fe143
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement13.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SMALL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("small");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-SMALL",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement13</h2>
+<p>&lt;test name='HTMLElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SMALL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"small"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-SMALL"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement130.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement130.html
new file mode 100644
index 0000000000..4aefeef5d6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement130.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement130</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement130'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the EM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement130() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement130") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("em");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","EM-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement130</h2>
+<p>&lt;test name='HTMLElement130' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement130&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the EM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"em"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"EM-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement131.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement131.html
new file mode 100644
index 0000000000..26c779f804
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement131.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement131</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement131'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the STRONG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement131() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement131") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strong");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","STRONG-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement131</h2>
+<p>&lt;test name='HTMLElement131' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement131&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the STRONG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strong"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"STRONG-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement132.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement132.html
new file mode 100644
index 0000000000..53d4e6a436
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement132.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement132</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement132'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DFN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement132() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement132") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dfn");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","DFN-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement132</h2>
+<p>&lt;test name='HTMLElement132' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement132&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DFN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dfn"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"DFN-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement133.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement133.html
new file mode 100644
index 0000000000..27cd339f0a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement133.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement133</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement133'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CODE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement133() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement133") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("code");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","CODE-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement133</h2>
+<p>&lt;test name='HTMLElement133' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement133&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CODE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"code"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"CODE-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement134.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement134.html
new file mode 100644
index 0000000000..d64f1fd210
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement134.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement134</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement134'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SAMP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement134() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement134") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("samp");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","SAMP-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement134</h2>
+<p>&lt;test name='HTMLElement134' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement134&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the SAMP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"samp"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"SAMP-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement135.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement135.html
new file mode 100644
index 0000000000..b0377bcd21
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement135.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement135</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement135'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the KBD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement135() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement135") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("kbd");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","KBD-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement135</h2>
+<p>&lt;test name='HTMLElement135' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement135&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the KBD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"kbd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"KBD-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement136.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement136.html
new file mode 100644
index 0000000000..7d35fe2685
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement136.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement136</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement136'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the VAR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement136() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement136") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("var");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","VAR-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement136</h2>
+<p>&lt;test name='HTMLElement136' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement136&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the VAR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"var"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"VAR-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement137.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement137.html
new file mode 100644
index 0000000000..52fcc7b508
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement137.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement137</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement137'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CITE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement137() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement137") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("cite");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","CITE-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement137</h2>
+<p>&lt;test name='HTMLElement137' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement137&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CITE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"cite"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"CITE-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement138.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement138.html
new file mode 100644
index 0000000000..a634219242
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement138.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement138</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement138'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ACRONYM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement138() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement138") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("acronym");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","ACRONYM-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement138</h2>
+<p>&lt;test name='HTMLElement138' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement138&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ACRONYM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"acronym"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"ACRONYM-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement139.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement139.html
new file mode 100644
index 0000000000..db97835538
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement139.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement139</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement139'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ABBR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement139() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement139") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("abbr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","ABBR-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement139</h2>
+<p>&lt;test name='HTMLElement139' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement139&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ABBR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"abbr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"ABBR-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement14.html
new file mode 100644
index 0000000000..9986bfef1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement14.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the EM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("em");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-EM",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement14</h2>
+<p>&lt;test name='HTMLElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the EM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"em"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-EM"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement140.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement140.html
new file mode 100644
index 0000000000..0a66a41e0c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement140.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement140</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement140'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement140() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement140") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dd");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","DD-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement140</h2>
+<p>&lt;test name='HTMLElement140' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement140&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"DD-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement141.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement141.html
new file mode 100644
index 0000000000..c960b5fd7e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement141.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement141</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement141'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement141() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement141") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","DT-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement141</h2>
+<p>&lt;test name='HTMLElement141' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement141&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the DT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"DT-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement142.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement142.html
new file mode 100644
index 0000000000..aaf0545103
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement142.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement142</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement142'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the NOFRAMES element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement142() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement142") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noframes");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","NOFRAMES-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement142</h2>
+<p>&lt;test name='HTMLElement142' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement142&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the NOFRAMES element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noframes"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"NOFRAMES-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement143.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement143.html
new file mode 100644
index 0000000000..561c26d161
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement143.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement143</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement143'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the NOSCRIPT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement143() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement143") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noscript");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","NOSCRIPT-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement143</h2>
+<p>&lt;test name='HTMLElement143' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement143&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the NOSCRIPT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noscript"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"NOSCRIPT-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement144.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement144.html
new file mode 100644
index 0000000000..578ebe20b6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement144.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement144</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement144'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ADDRESS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement144() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement144") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("address");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","ADDRESS-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement144</h2>
+<p>&lt;test name='HTMLElement144' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement144&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the ADDRESS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"address"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"ADDRESS-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement145.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement145.html
new file mode 100644
index 0000000000..6df3fd8a89
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement145.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement145</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement145'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CENTER element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176
+*/
+function HTMLElement145() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement145") != null) return;
+ var nodeList;
+ var testNode;
+ var vclassname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("center");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vclassname = testNode.className;
+
+ assertEquals("classNameLink","CENTER-class",vclassname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement145</h2>
+<p>&lt;test name='HTMLElement145' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement145&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The className attribute specifies the class attribute of the element.
+
+ Retrieve the class attribute of the CENTER element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95362176</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vclassname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"center"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;className interface='HTMLElement' obj='testNode' var='vclassname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vclassname' expected='"CENTER-class"' <a id="classNameLink">id='classNameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement15.html
new file mode 100644
index 0000000000..3970167dc1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement15.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the STRONG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strong");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-STRONG",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement15</h2>
+<p>&lt;test name='HTMLElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the STRONG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strong"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-STRONG"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement16.html
new file mode 100644
index 0000000000..9599f1d74f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement16.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DFN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dfn");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-DFN",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement16</h2>
+<p>&lt;test name='HTMLElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DFN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dfn"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-DFN"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement17.html
new file mode 100644
index 0000000000..7d90786de6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement17.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CODE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("code");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-CODE",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement17</h2>
+<p>&lt;test name='HTMLElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CODE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"code"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-CODE"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement18.html
new file mode 100644
index 0000000000..b3a41f9f08
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement18.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SAMP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("samp");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-SAMP",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement18</h2>
+<p>&lt;test name='HTMLElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the SAMP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"samp"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-SAMP"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement19.html
new file mode 100644
index 0000000000..0500241bca
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement19.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the KBD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("kbd");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-KBD",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement19</h2>
+<p>&lt;test name='HTMLElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the KBD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"kbd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-KBD"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement20.html
new file mode 100644
index 0000000000..0a4a135580
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement20.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the VAR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("var");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-VAR",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement20</h2>
+<p>&lt;test name='HTMLElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the VAR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"var"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-VAR"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement21.html
new file mode 100644
index 0000000000..2eeafa7472
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement21.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CITE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement21") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("cite");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-CITE",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement21</h2>
+<p>&lt;test name='HTMLElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CITE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"cite"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-CITE"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement22.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement22.html
new file mode 100644
index 0000000000..cdc2f0019b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement22.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ACRONYM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement22() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement22") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("acronym");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-ACRONYM",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement22</h2>
+<p>&lt;test name='HTMLElement22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ACRONYM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"acronym"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-ACRONYM"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement23.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement23.html
new file mode 100644
index 0000000000..3d204d201b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement23.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement23</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement23'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ABBR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement23() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement23") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("abbr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-ABBR",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement23</h2>
+<p>&lt;test name='HTMLElement23' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement23&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ABBR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"abbr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-ABBR"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement24.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement24.html
new file mode 100644
index 0000000000..35f95826f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement24.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement24</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement24'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement24() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement24") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dd");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-DD",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement24</h2>
+<p>&lt;test name='HTMLElement24' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement24&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-DD"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement25.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement25.html
new file mode 100644
index 0000000000..80e3cca658
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement25.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement25</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement25'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement25() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement25") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-DT",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement25</h2>
+<p>&lt;test name='HTMLElement25' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement25&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the DT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-DT"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement26.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement26.html
new file mode 100644
index 0000000000..d76b252f66
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement26.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement26</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement26'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the NOFRAMES element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement26() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement26") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noframes");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-NOFRAMES",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement26</h2>
+<p>&lt;test name='HTMLElement26' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement26&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the NOFRAMES element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noframes"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-NOFRAMES"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement27.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement27.html
new file mode 100644
index 0000000000..bc78722b68
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement27.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement27</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement27'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the NOSCRIPT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement27() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement27") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noscript");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-NOSCRIPT",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement27</h2>
+<p>&lt;test name='HTMLElement27' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement27&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the NOSCRIPT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noscript"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-NOSCRIPT"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement28.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement28.html
new file mode 100644
index 0000000000..99ff340b42
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement28.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement28</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement28'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ADDRESS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement28() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement28") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("address");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-ADDRESS",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement28</h2>
+<p>&lt;test name='HTMLElement28' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement28&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the ADDRESS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"address"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-ADDRESS"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement29.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement29.html
new file mode 100644
index 0000000000..05ac44dde3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement29.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement29</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement29'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CENTER element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function HTMLElement29() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement29") != null) return;
+ var nodeList;
+ var testNode;
+ var vid;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("center");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vid = testNode.id;
+
+ assertEquals("idLink","Test-CENTER",vid);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement29</h2>
+<p>&lt;test name='HTMLElement29' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement29&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id specifies the elements identifier.
+
+ Retrieve the id attribute of the CENTER element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vid' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"center"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='testNode' var='vid'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vid' expected='"Test-CENTER"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement30.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement30.html
new file mode 100644
index 0000000000..f6d34d3c95
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement30.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement30</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement30'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the HEAD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement30() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement30") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("head");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","HEAD Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement30</h2>
+<p>&lt;test name='HTMLElement30' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement30&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the HEAD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"head"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"HEAD Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement31.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement31.html
new file mode 100644
index 0000000000..545c044e00
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement31.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement31</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement31'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SUB element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement31() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement31") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sub");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","SUB Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement31</h2>
+<p>&lt;test name='HTMLElement31' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement31&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SUB element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sub"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"SUB Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement32.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement32.html
new file mode 100644
index 0000000000..77ba145d9b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement32.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement32</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement32'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SUP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement32() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement32") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","SUP Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement32</h2>
+<p>&lt;test name='HTMLElement32' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement32&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SUP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"SUP Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement33.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement33.html
new file mode 100644
index 0000000000..92b86a42af
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement33.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement33</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement33'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SPAN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement33() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement33") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("span");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","SPAN Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement33</h2>
+<p>&lt;test name='HTMLElement33' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement33&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SPAN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"span"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"SPAN Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement34.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement34.html
new file mode 100644
index 0000000000..eecbf1d458
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement34.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement34</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement34'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the BDO element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement34() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement34") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("bdo");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","BDO Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement34</h2>
+<p>&lt;test name='HTMLElement34' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement34&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the BDO element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"bdo"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"BDO Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement35.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement35.html
new file mode 100644
index 0000000000..e396a94428
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement35.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement35</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement35'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the TT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement35() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement35") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("tt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","TT Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement35</h2>
+<p>&lt;test name='HTMLElement35' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement35&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the TT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"TT Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement36.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement36.html
new file mode 100644
index 0000000000..03c536929b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement36.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement36</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement36'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the I element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement36() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement36") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("i");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","I Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement36</h2>
+<p>&lt;test name='HTMLElement36' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement36&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the I element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"i"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"I Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement37.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement37.html
new file mode 100644
index 0000000000..9d3c38af1d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement37.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement37</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement37'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the B element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement37() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement37") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("b");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","B Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement37</h2>
+<p>&lt;test name='HTMLElement37' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement37&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the B element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"b"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"B Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement38.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement38.html
new file mode 100644
index 0000000000..3475291755
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement38.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement38</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement38'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the U element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement38() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement38") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("u");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","U Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement38</h2>
+<p>&lt;test name='HTMLElement38' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement38&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the U element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"u"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"U Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement39.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement39.html
new file mode 100644
index 0000000000..d1077d2f01
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement39.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement39</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement39'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the S element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement39() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement39") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("s");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","S Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement39</h2>
+<p>&lt;test name='HTMLElement39' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement39&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the S element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"s"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"S Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement40.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement40.html
new file mode 100644
index 0000000000..59068fce67
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement40.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement40</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement40'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the STRIKE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement40() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement40") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strike");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","STRIKE Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement40</h2>
+<p>&lt;test name='HTMLElement40' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement40&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the STRIKE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strike"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"STRIKE Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement41.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement41.html
new file mode 100644
index 0000000000..7585e950fa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement41.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement41</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement41'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the BIG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement41() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement41") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("big");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","BIG Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement41</h2>
+<p>&lt;test name='HTMLElement41' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement41&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the BIG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"big"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"BIG Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement42.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement42.html
new file mode 100644
index 0000000000..329d1cd5f2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement42.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement42</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement42'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SMALL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement42() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement42") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("small");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","SMALL Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement42</h2>
+<p>&lt;test name='HTMLElement42' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement42&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SMALL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"small"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"SMALL Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement43.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement43.html
new file mode 100644
index 0000000000..a4ca5977c4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement43.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement43</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement43'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the EM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement43() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement43") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("em");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","EM Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement43</h2>
+<p>&lt;test name='HTMLElement43' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement43&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the EM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"em"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"EM Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement44.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement44.html
new file mode 100644
index 0000000000..56f5e9cbf6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement44.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement44</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement44'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the STRONG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement44() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement44") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strong");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","STRONG Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement44</h2>
+<p>&lt;test name='HTMLElement44' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement44&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the STRONG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strong"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"STRONG Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement45.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement45.html
new file mode 100644
index 0000000000..c0457ff67b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement45.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement45</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement45'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DFN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement45() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement45") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dfn");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","DFN Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement45</h2>
+<p>&lt;test name='HTMLElement45' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement45&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DFN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dfn"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"DFN Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement46.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement46.html
new file mode 100644
index 0000000000..ebfb593d13
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement46.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement46</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement46'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CODE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement46() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement46") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("code");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","CODE Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement46</h2>
+<p>&lt;test name='HTMLElement46' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement46&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CODE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"code"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"CODE Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement47.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement47.html
new file mode 100644
index 0000000000..7d01dfb3f2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement47.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement47</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement47'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SAMP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement47() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement47") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("samp");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","SAMP Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement47</h2>
+<p>&lt;test name='HTMLElement47' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement47&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the SAMP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"samp"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"SAMP Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement48.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement48.html
new file mode 100644
index 0000000000..bf2535a366
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement48.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement48</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement48'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the KBD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement48() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement48") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("kbd");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","KBD Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement48</h2>
+<p>&lt;test name='HTMLElement48' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement48&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the KBD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"kbd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"KBD Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement49.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement49.html
new file mode 100644
index 0000000000..6fa0e76e02
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement49.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement49</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement49'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the VAR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement49() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement49") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("var");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","VAR Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement49</h2>
+<p>&lt;test name='HTMLElement49' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement49&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the VAR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"var"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"VAR Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement50.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement50.html
new file mode 100644
index 0000000000..dbea976bec
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement50.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement50</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement50'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CITE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement50() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement50") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("cite");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","CITE Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement50</h2>
+<p>&lt;test name='HTMLElement50' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement50&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CITE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"cite"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"CITE Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement51.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement51.html
new file mode 100644
index 0000000000..9d48ce5d04
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement51.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement51</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement51'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ACRONYM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement51() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement51") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("acronym");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","ACRONYM Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement51</h2>
+<p>&lt;test name='HTMLElement51' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement51&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ACRONYM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"acronym"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"ACRONYM Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement52.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement52.html
new file mode 100644
index 0000000000..c76b615a16
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement52.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement52</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement52'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ABBR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement52() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement52") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("abbr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","ABBR Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement52</h2>
+<p>&lt;test name='HTMLElement52' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement52&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ABBR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"abbr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"ABBR Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement53.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement53.html
new file mode 100644
index 0000000000..92d168a89f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement53.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement53</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement53'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement53() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement53") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dd");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","DD Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement53</h2>
+<p>&lt;test name='HTMLElement53' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement53&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"DD Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement54.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement54.html
new file mode 100644
index 0000000000..2916e0187c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement54.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement54</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement54'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement54() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement54") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","DT Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement54</h2>
+<p>&lt;test name='HTMLElement54' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement54&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the DT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"DT Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement55.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement55.html
new file mode 100644
index 0000000000..532e13f69f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement55.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement55</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement55'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the NOFRAMES element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement55() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement55") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noframes");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","NOFRAMES Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement55</h2>
+<p>&lt;test name='HTMLElement55' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement55&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the NOFRAMES element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noframes"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NOFRAMES Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement56.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement56.html
new file mode 100644
index 0000000000..f839b6bf1b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement56.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement56</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement56'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the NOSCRIPT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement56() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement56") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noscript");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","NOSCRIPT Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement56</h2>
+<p>&lt;test name='HTMLElement56' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement56&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the NOSCRIPT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noscript"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NOSCRIPT Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement57.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement57.html
new file mode 100644
index 0000000000..e075ab5f2a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement57.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement57</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement57'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ADDRESS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement57() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement57") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("address");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","ADDRESS Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement57</h2>
+<p>&lt;test name='HTMLElement57' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement57&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the ADDRESS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"address"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"ADDRESS Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement58.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement58.html
new file mode 100644
index 0000000000..cc793c9a1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement58.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement58</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement58'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CENTER element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800
+*/
+function HTMLElement58() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement58") != null) return;
+ var nodeList;
+ var testNode;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("center");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtitle = testNode.title;
+
+ assertEquals("titleLink","CENTER Element",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement58</h2>
+<p>&lt;test name='HTMLElement58' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement58&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The title attribute specifies the elements advisory title.
+
+ Retrieve the title attribute of the CENTER element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78276800</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"center"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLElement' obj='testNode' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"CENTER Element"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement59.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement59.html
new file mode 100644
index 0000000000..61a12495aa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement59.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement59</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement59'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the HEAD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement59() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement59") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("head");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement59</h2>
+<p>&lt;test name='HTMLElement59' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement59&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the HEAD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"head"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement60.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement60.html
new file mode 100644
index 0000000000..ec9fa2e8ce
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement60.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement60</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement60'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SUB element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement60() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement60") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sub");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement60</h2>
+<p>&lt;test name='HTMLElement60' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement60&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SUB element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sub"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement61.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement61.html
new file mode 100644
index 0000000000..5960690bb8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement61.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement61</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement61'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SUP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement61() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement61") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement61</h2>
+<p>&lt;test name='HTMLElement61' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement61&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SUP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement62.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement62.html
new file mode 100644
index 0000000000..43f4d603ab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement62.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement62</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement62'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SPAN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement62() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement62") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("span");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement62</h2>
+<p>&lt;test name='HTMLElement62' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement62&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SPAN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"span"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement63.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement63.html
new file mode 100644
index 0000000000..619ac4cba5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement63.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement63</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement63'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the BDO element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement63() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement63") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("bdo");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement63</h2>
+<p>&lt;test name='HTMLElement63' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement63&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the BDO element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"bdo"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement64.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement64.html
new file mode 100644
index 0000000000..36af3dc1af
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement64.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement64</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement64'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the TT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement64() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement64") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("tt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement64</h2>
+<p>&lt;test name='HTMLElement64' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement64&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the TT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement65.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement65.html
new file mode 100644
index 0000000000..2b885c7b31
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement65.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement65</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement65'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the I element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement65() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement65") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("i");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement65</h2>
+<p>&lt;test name='HTMLElement65' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement65&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the I element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"i"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement66.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement66.html
new file mode 100644
index 0000000000..9fe2113f1d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement66.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement66</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement66'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the B element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement66() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement66") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("b");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement66</h2>
+<p>&lt;test name='HTMLElement66' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement66&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the B element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"b"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement67.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement67.html
new file mode 100644
index 0000000000..9da62642c0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement67.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement67</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement67'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the U element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement67() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement67") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("u");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement67</h2>
+<p>&lt;test name='HTMLElement67' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement67&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the U element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"u"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement68.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement68.html
new file mode 100644
index 0000000000..1ba4fdeea6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement68.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement68</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement68'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the S element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement68() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement68") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("s");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement68</h2>
+<p>&lt;test name='HTMLElement68' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement68&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the S element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"s"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement69.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement69.html
new file mode 100644
index 0000000000..3eec8ec8ab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement69.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement69</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement69'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the STRIKE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement69() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement69") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strike");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement69</h2>
+<p>&lt;test name='HTMLElement69' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement69&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the STRIKE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strike"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement70.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement70.html
new file mode 100644
index 0000000000..8247d2fc63
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement70.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement70</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement70'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the BIG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement70() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement70") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("big");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement70</h2>
+<p>&lt;test name='HTMLElement70' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement70&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the BIG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"big"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement71.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement71.html
new file mode 100644
index 0000000000..3faa251eae
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement71.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement71</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement71'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SMALL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement71() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement71") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("small");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement71</h2>
+<p>&lt;test name='HTMLElement71' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement71&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SMALL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"small"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement72.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement72.html
new file mode 100644
index 0000000000..ae85358b29
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement72.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement72</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement72'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the EM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement72() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement72") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("em");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement72</h2>
+<p>&lt;test name='HTMLElement72' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement72&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the EM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"em"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement73.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement73.html
new file mode 100644
index 0000000000..8f0334f13f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement73.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement73</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement73'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the STRONG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement73() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement73") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strong");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement73</h2>
+<p>&lt;test name='HTMLElement73' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement73&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the STRONG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strong"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement74.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement74.html
new file mode 100644
index 0000000000..be11da8aaa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement74.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement74</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement74'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DFN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement74() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement74") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dfn");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement74</h2>
+<p>&lt;test name='HTMLElement74' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement74&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DFN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dfn"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement75.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement75.html
new file mode 100644
index 0000000000..7f351ac550
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement75.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement75</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement75'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CODE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement75() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement75") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("code");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement75</h2>
+<p>&lt;test name='HTMLElement75' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement75&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CODE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"code"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement76.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement76.html
new file mode 100644
index 0000000000..3e821ac7f9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement76.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement76</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement76'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SAMP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement76() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement76") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("samp");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement76</h2>
+<p>&lt;test name='HTMLElement76' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement76&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the SAMP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"samp"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement77.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement77.html
new file mode 100644
index 0000000000..b5fff09002
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement77.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement77</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement77'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the KBD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement77() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement77") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("kbd");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement77</h2>
+<p>&lt;test name='HTMLElement77' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement77&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the KBD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"kbd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement78.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement78.html
new file mode 100644
index 0000000000..dae8008331
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement78.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement78</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement78'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the VAR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement78() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement78") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("var");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement78</h2>
+<p>&lt;test name='HTMLElement78' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement78&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the VAR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"var"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement79.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement79.html
new file mode 100644
index 0000000000..3cab31d8d0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement79.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement79</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement79'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CITE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement79() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement79") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("cite");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement79</h2>
+<p>&lt;test name='HTMLElement79' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement79&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CITE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"cite"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement80.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement80.html
new file mode 100644
index 0000000000..a064e4cff0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement80.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement80</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement80'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ACRONYM element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement80() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement80") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("acronym");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement80</h2>
+<p>&lt;test name='HTMLElement80' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement80&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ACRONYM element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"acronym"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement81.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement81.html
new file mode 100644
index 0000000000..da67f24eae
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement81.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement81</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement81'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ABBR element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement81() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement81") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("abbr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement81</h2>
+<p>&lt;test name='HTMLElement81' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement81&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ABBR element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"abbr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement82.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement82.html
new file mode 100644
index 0000000000..7a5ca9ee3c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement82.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement82</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement82'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement82() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement82") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dd");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement82</h2>
+<p>&lt;test name='HTMLElement82' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement82&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dd"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement83.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement83.html
new file mode 100644
index 0000000000..da5d9aff84
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement83.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement83</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement83'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement83() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement83") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("dt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement83</h2>
+<p>&lt;test name='HTMLElement83' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement83&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the DT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement84.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement84.html
new file mode 100644
index 0000000000..f40fdf3c87
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement84.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement84</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement84'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the NOFRAMES element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement84() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement84") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noframes");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement84</h2>
+<p>&lt;test name='HTMLElement84' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement84&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the NOFRAMES element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noframes"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement85.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement85.html
new file mode 100644
index 0000000000..d6373f3978
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement85.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement85</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement85'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the NOSCRIPT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement85() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement85") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("noscript");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement85</h2>
+<p>&lt;test name='HTMLElement85' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement85&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the NOSCRIPT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"noscript"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement86.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement86.html
new file mode 100644
index 0000000000..d509540c80
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement86.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement86</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement86'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ADDRESS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement86() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement86") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("address");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement86</h2>
+<p>&lt;test name='HTMLElement86' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement86&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the ADDRESS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"address"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement87.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement87.html
new file mode 100644
index 0000000000..cf14b95c9d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement87.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement87</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement87'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CENTER element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807
+*/
+function HTMLElement87() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement87") != null) return;
+ var nodeList;
+ var testNode;
+ var vlang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("center");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vlang = testNode.lang;
+
+ assertEquals("langLink","en",vlang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement87</h2>
+<p>&lt;test name='HTMLElement87' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement87&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The lang attribute specifies the language code defined in RFC 1766.
+
+ Retrieve the lang attribute of the CENTER element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59132807</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"center"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lang interface='HTMLElement' obj='testNode' var='vlang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlang' expected='"en"' <a id="langLink">id='langLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement88.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement88.html
new file mode 100644
index 0000000000..092b098c1b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement88.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement88</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement88'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the HEAD element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement88() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement88") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("head");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement88</h2>
+<p>&lt;test name='HTMLElement88' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement88&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the HEAD element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"head"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement89.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement89.html
new file mode 100644
index 0000000000..e4ad0850e8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement89.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement89</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement89'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SUB element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement89() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement89") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sub");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement89</h2>
+<p>&lt;test name='HTMLElement89' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement89&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SUB element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sub"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement90.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement90.html
new file mode 100644
index 0000000000..38feff556f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement90.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement90</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement90'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SUP element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement90() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement90") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("sup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement90</h2>
+<p>&lt;test name='HTMLElement90' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement90&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SUP element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"sup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement91.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement91.html
new file mode 100644
index 0000000000..5e4a617c0b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement91.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement91</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement91'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SPAN element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement91() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement91") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("span");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement91</h2>
+<p>&lt;test name='HTMLElement91' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement91&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the SPAN element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"span"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement92.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement92.html
new file mode 100644
index 0000000000..faf54c2759
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement92.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement92</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement92'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the BDO element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement92() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement92") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("bdo");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement92</h2>
+<p>&lt;test name='HTMLElement92' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement92&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the BDO element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"bdo"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement93.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement93.html
new file mode 100644
index 0000000000..a9ee0d3ddb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement93.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement93</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement93'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the TT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement93() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement93") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("tt");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement93</h2>
+<p>&lt;test name='HTMLElement93' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement93&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the TT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tt"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement94.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement94.html
new file mode 100644
index 0000000000..27f9d9a140
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement94.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement94</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement94'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the I element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement94() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement94") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("i");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement94</h2>
+<p>&lt;test name='HTMLElement94' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement94&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the I element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"i"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement95.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement95.html
new file mode 100644
index 0000000000..2979e1c77f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement95.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement95</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement95'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the B element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement95() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement95") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("b");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement95</h2>
+<p>&lt;test name='HTMLElement95' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement95&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the B element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"b"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement96.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement96.html
new file mode 100644
index 0000000000..b8b0b915d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement96.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement96</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement96'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the U element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement96() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement96") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("u");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement96</h2>
+<p>&lt;test name='HTMLElement96' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement96&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the U element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"u"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement97.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement97.html
new file mode 100644
index 0000000000..af72e7a4ba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement97.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement97</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement97'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the S element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement97() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement97") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("s");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement97</h2>
+<p>&lt;test name='HTMLElement97' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement97&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the S element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"s"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement98.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement98.html
new file mode 100644
index 0000000000..0e54b74031
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement98.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement98</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement98'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the STRIKE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement98() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement98") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("strike");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement98</h2>
+<p>&lt;test name='HTMLElement98' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement98&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the STRIKE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"strike"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLElement99.html b/dom/tests/mochitest/dom-level2-html/test_HTMLElement99.html
new file mode 100644
index 0000000000..20d47bbc0f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLElement99.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement99</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLElement99'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "element");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the BIG element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740
+*/
+function HTMLElement99() {
+ var success;
+ if(checkInitialization(builder, "HTMLElement99") != null) return;
+ var nodeList;
+ var testNode;
+ var vdir;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "element");
+ nodeList = doc.getElementsByTagName("big");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdir = testNode.dir;
+
+ assertEquals("dirLink","ltr",vdir);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLElement99</h2>
+<p>&lt;test name='HTMLElement99' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLElement99&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dir attribute specifies the base direction of directionally neutral text and the directionality of tables.
+
+ Retrieve the dir attribute of the BIG element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52460740</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdir' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='element' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"big"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dir interface='HTMLElement' obj='testNode' var='vdir'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdir' expected='"ltr"' <a id="dirLink">id='dirLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/element.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement01.html
new file mode 100644
index 0000000000..99fb8119a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement01.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFieldSetElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFieldSetElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "fieldset");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630
+*/
+function HTMLFieldSetElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLFieldSetElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "fieldset");
+ nodeList = doc.getElementsByTagName("fieldset");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form2",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFieldSetElement01</h2>
+<p>&lt;test name='HTMLFieldSetElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFieldSetElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='fieldset' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"fieldset"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLFieldSetElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form2"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/fieldset.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement02.html
new file mode 100644
index 0000000000..e4b21432f4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFieldSetElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFieldSetElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFieldSetElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "fieldset");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630
+*/
+function HTMLFieldSetElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLFieldSetElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "fieldset");
+ nodeList = doc.getElementsByTagName("fieldset");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFieldSetElement02</h2>
+<p>&lt;test name='HTMLFieldSetElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFieldSetElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75392630</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='fieldset' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"fieldset"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLFieldSetElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/fieldset.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement01.html
new file mode 100644
index 0000000000..0b29d8be1c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFontElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "font");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The color attribute specifies the font's color.
+
+ Retrieve the color attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53532975
+*/
+function HTMLFontElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLFontElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "font");
+ nodeList = doc.getElementsByTagName("font");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcolor = testNode.color;
+
+ assertEquals("colorLink","#000000",vcolor);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement01</h2>
+<p>&lt;test name='HTMLFontElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFontElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The color attribute specifies the font's color.
+
+ Retrieve the color attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53532975">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53532975</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='font' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"font"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;color interface='HTMLFontElement' obj='testNode' var='vcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcolor' expected='"#000000"' <a id="colorLink">id='colorLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/font.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement02.html
new file mode 100644
index 0000000000..be9b470e18
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFontElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "font");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The face attribute specifies the font's face identifier.
+
+ Retrieve the face attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55715655
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length
+*/
+function HTMLFontElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLFontElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vface;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "font");
+ nodeList = doc.getElementsByTagName("font");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vface = testNode.face;
+
+ assertEquals("faceLink","arial,helvetica",vface);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement02</h2>
+<p>&lt;test name='HTMLFontElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFontElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The face attribute specifies the font's face identifier.
+
+ Retrieve the face attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55715655">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55715655</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vface' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='font' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"font"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;face interface='HTMLFontElement' obj='testNode' var='vface'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vface' expected='"arial,helvetica"' <a id="faceLink">id='faceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/font.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement03.html
new file mode 100644
index 0000000000..055a52d10a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFontElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFontElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "font");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The size attribute specifies the font's size.
+
+ Retrieve the size attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90127284
+*/
+function HTMLFontElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLFontElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vsize;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "font");
+ nodeList = doc.getElementsByTagName("font");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vsize = testNode.size;
+
+ assertEquals("sizeLink","4",vsize);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFontElement03</h2>
+<p>&lt;test name='HTMLFontElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFontElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The size attribute specifies the font's size.
+
+ Retrieve the size attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90127284">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90127284</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsize' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='font' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"font"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;size interface='HTMLFontElement' obj='testNode' var='vsize'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsize' expected='"4"' <a id="sizeLink">id='sizeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/font.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement01.html
new file mode 100644
index 0000000000..6915eeffd4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement01.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The elements attribute specifies a collection of all control element
+ in the form.
+
+ Retrieve the elements attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479
+*/
+function HTMLFormElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement01") != null) return;
+ var nodeList;
+ var elementnodeList;
+ var testNode;
+ var velements;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ elementnodeList = testNode.elements;
+
+ velements = elementnodeList.length;
+
+ assertEquals("elementsLink",3,velements);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement01</h2>
+<p>&lt;test name='HTMLFormElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The elements attribute specifies a collection of all control element
+ in the form.
+
+ Retrieve the elements attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76728479</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='elementnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='velements' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='elementnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='elementnodeList' var='velements'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='velements' expected='3' <a id="elementsLink">id='elementsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement02.html
new file mode 100644
index 0000000000..109a308a6d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The length attribute specifies the number of form controls
+ in the form.
+
+ Retrieve the length attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40002357
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length
+*/
+function HTMLFormElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlength = testNode.length;
+
+ assertEquals("lengthLink",3,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement02</h2>
+<p>&lt;test name='HTMLFormElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The length attribute specifies the number of form controls
+ in the form.
+
+ Retrieve the length attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40002357">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40002357</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLFormElement-length</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLFormElement' obj='testNode' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='3' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement03.html
new file mode 100644
index 0000000000..a014f1fbc6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The id(name) attribute specifies the name of the form.
+
+ Retrieve the id attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22051454
+*/
+function HTMLFormElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.id;
+
+ assertEquals("nameLink","form1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement03</h2>
+<p>&lt;test name='HTMLFormElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The id(name) attribute specifies the name of the form.
+
+ Retrieve the id attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22051454">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22051454</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"form1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement04.html
new file mode 100644
index 0000000000..7c5b42a1e9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The acceptCharset attribute specifies the list of character sets
+ supported by the server.
+
+ Retrieve the acceptCharset attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19661795
+*/
+function HTMLFormElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vacceptcharset;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vacceptcharset = testNode.acceptCharset;
+
+ assertEquals("acceptCharsetLink","US-ASCII",vacceptcharset);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement04</h2>
+<p>&lt;test name='HTMLFormElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The acceptCharset attribute specifies the list of character sets
+ supported by the server.
+
+ Retrieve the acceptCharset attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19661795">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19661795</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vacceptcharset' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;acceptCharset interface='HTMLFormElement' obj='testNode' var='vacceptcharset'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vacceptcharset' expected='"US-ASCII"' <a id="acceptCharsetLink">id='acceptCharsetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement05.html
new file mode 100644
index 0000000000..975cc5274f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The action attribute specifies the server-side form handler.
+
+ Retrieve the action attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184
+*/
+function HTMLFormElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vaction;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vaction = testNode.action;
+
+ assertURIEquals("actionLink",null,null,null,"getData.pl",null,null,null,null,vaction);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement05</h2>
+<p>&lt;test name='HTMLFormElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The action attribute specifies the server-side form handler.
+
+ Retrieve the action attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaction' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action interface='HTMLFormElement' obj='testNode' var='vaction'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vaction' file='"getData.pl"' <a id="actionLink">id='actionLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement06.html
new file mode 100644
index 0000000000..da41587654
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The enctype attribute specifies the content of the submitted form.
+
+ Retrieve the enctype attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84227810
+*/
+function HTMLFormElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var venctype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ venctype = testNode.enctype;
+
+ assertEquals("enctypeLink","application/x-www-form-urlencoded",venctype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement06</h2>
+<p>&lt;test name='HTMLFormElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The enctype attribute specifies the content of the submitted form.
+
+ Retrieve the enctype attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84227810">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84227810</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='venctype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;enctype interface='HTMLFormElement' obj='testNode' var='venctype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='venctype' expected='"application/x-www-form-urlencoded"' <a id="enctypeLink">id='enctypeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement07.html
new file mode 100644
index 0000000000..d9467ffc09
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The method attribute specifies the HTTP method used to submit the form.
+
+ Retrieve the method attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539
+*/
+function HTMLFormElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vmethod;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vmethod = testNode.method;
+
+ assertEquals("methodLink","post",vmethod);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement07</h2>
+<p>&lt;test name='HTMLFormElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The method attribute specifies the HTTP method used to submit the form.
+
+ Retrieve the method attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmethod' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;method interface='HTMLFormElement' obj='testNode' var='vmethod'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmethod' expected='"post"' <a id="methodLink">id='methodLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement08.html
new file mode 100644
index 0000000000..e22ff74842
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The target attribute specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6512890
+*/
+function HTMLFormElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vtarget;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form2");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtarget = testNode.target;
+
+ assertEquals("targetLink","dynamic",vtarget);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement08</h2>
+<p>&lt;test name='HTMLFormElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The target attribute specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6512890">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6512890</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtarget' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target interface='HTMLFormElement' obj='testNode' var='vtarget'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtarget' expected='"dynamic"' <a id="targetLink">id='targetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement09.html
new file mode 100644
index 0000000000..f4f4a8c4da
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement09.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLFormElement.reset restores the forms default values.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767677
+*/
+function HTMLFormElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form2");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ testNode.reset();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement09</h2>
+<p>&lt;test name='HTMLFormElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLFormElement.reset restores the forms default values.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767677">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767677</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form2' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;reset interface='HTMLFormElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement10.html
new file mode 100644
index 0000000000..584a43b8c8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFormElement10.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFormElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "form3");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLFormElement.submit submits the form.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767676
+*/
+function HTMLFormElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLFormElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "form3");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ testNode.submit();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFormElement10</h2>
+<p>&lt;test name='HTMLFormElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFormElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLFormElement.submit submits the form.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767676">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76767676</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='form3' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;submit interface='HTMLFormElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/form3.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement01.html
new file mode 100644
index 0000000000..f871ac85de
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement01.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The frameBorder attribute specifies the request for frame borders.
+ (frameBorder=1 A border is drawn)
+ (FrameBorder=0 A border is not drawn)
+
+ Retrieve the frameBorder attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11858633
+*/
+function HTMLFrameElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vframeborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vframeborder = testNode.frameBorder;
+
+ assertEquals("frameborderLink","1",vframeborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement01</h2>
+<p>&lt;test name='HTMLFrameElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The frameBorder attribute specifies the request for frame borders.
+ (frameBorder=1 A border is drawn)
+ (FrameBorder=0 A border is not drawn)
+
+ Retrieve the frameBorder attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11858633">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11858633</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vframeborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;frameBorder interface='HTMLFrameElement' obj='testNode' var='vframeborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vframeborder' expected='"1"' <a id="frameborderLink">id='frameborderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement02.html
new file mode 100644
index 0000000000..4a6a00fccf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The longDesc attribute specifies a URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute of the first FRAME element and examine
+ its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7836998
+*/
+function HTMLFrameElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vlongdesc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vlongdesc = testNode.longDesc;
+
+ assertEquals("longdescLink","about:blank",vlongdesc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement02</h2>
+<p>&lt;test name='HTMLFrameElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The longDesc attribute specifies a URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute of the first FRAME element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7836998">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-7836998</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlongdesc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;longDesc interface='HTMLFrameElement' obj='testNode' var='vlongdesc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlongdesc' expected='"about:blank"' ignoreCase='false' <a id="longdescLink">id='longdescLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement03.html
new file mode 100644
index 0000000000..b39e74e197
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The marginHeight attribute specifies the frame margin height, in pixels.
+
+ Retrieve the marginHeight attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55569778
+*/
+function HTMLFrameElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vmarginheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vmarginheight = testNode.marginHeight;
+
+ assertEquals("marginheightLink","10",vmarginheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement03</h2>
+<p>&lt;test name='HTMLFrameElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The marginHeight attribute specifies the frame margin height, in pixels.
+
+ Retrieve the marginHeight attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55569778">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-55569778</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmarginheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;marginHeight interface='HTMLFrameElement' obj='testNode' var='vmarginheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmarginheight' expected='"10"' <a id="marginheightLink">id='marginheightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement04.html
new file mode 100644
index 0000000000..3bc2423d0c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The marginWidth attribute specifies the frame margin width, in pixels.
+
+ Retrieve the marginWidth attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8369969
+*/
+function HTMLFrameElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vmarginwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vmarginwidth = testNode.marginWidth;
+
+ assertEquals("marginwidthLink","5",vmarginwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement04</h2>
+<p>&lt;test name='HTMLFrameElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The marginWidth attribute specifies the frame margin width, in pixels.
+
+ Retrieve the marginWidth attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8369969">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8369969</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmarginwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;marginWidth interface='HTMLFrameElement' obj='testNode' var='vmarginwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmarginwidth' expected='"5"' <a id="marginwidthLink">id='marginwidthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement05.html
new file mode 100644
index 0000000000..d027d6e38e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement05.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the frame name(object of the target
+ attribute).
+
+ Retrieve the name attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91128709
+*/
+function HTMLFrameElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","Frame1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement05</h2>
+<p>&lt;test name='HTMLFrameElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the frame name(object of the target
+ attribute).
+
+ Retrieve the name attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91128709">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91128709</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLFrameElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"Frame1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement06.html
new file mode 100644
index 0000000000..571774cead
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The noResize attribute specifies if the user can resize the frame. When
+ true, forbid user from resizing frame.
+
+ Retrieve the noResize attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80766578
+*/
+function HTMLFrameElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vnoresize;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vnoresize = testNode.noResize;
+
+ assertTrue("noresizeLink",vnoresize);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement06</h2>
+<p>&lt;test name='HTMLFrameElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The noResize attribute specifies if the user can resize the frame. When
+ true, forbid user from resizing frame.
+
+ Retrieve the noResize attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80766578">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80766578</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnoresize' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noResize interface='HTMLFrameElement' obj='testNode' var='vnoresize'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vnoresize' <a id="noresizeLink">id='noresizeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement07.html
new file mode 100644
index 0000000000..9fb425376c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The scrolling attribute specifies whether or not the frame should have
+ scrollbars.
+
+ Retrieve the scrolling attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45411424
+*/
+function HTMLFrameElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vscrolling;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vscrolling = testNode.scrolling;
+
+ assertEquals("scrollingLink","yes",vscrolling);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement07</h2>
+<p>&lt;test name='HTMLFrameElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The scrolling attribute specifies whether or not the frame should have
+ scrollbars.
+
+ Retrieve the scrolling attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45411424">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45411424</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscrolling' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scrolling interface='HTMLFrameElement' obj='testNode' var='vscrolling'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscrolling' expected='"yes"' <a id="scrollingLink">id='scrollingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement08.html
new file mode 100644
index 0000000000..f2a74c41ba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The src attribute specifies a URI designating the initial frame contents.
+
+ Retrieve the src attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78799535
+*/
+function HTMLFrameElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vsrc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame");
+ nodeList = doc.getElementsByTagName("frame");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vsrc = testNode.src;
+
+ assertURIEquals("srcLink",null,null,null,null,"right",null,null,null,vsrc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement08</h2>
+<p>&lt;test name='HTMLFrameElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The src attribute specifies a URI designating the initial frame contents.
+
+ Retrieve the src attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78799535">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78799535</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsrc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frame"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;src interface='HTMLFrameElement' obj='testNode' var='vsrc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vsrc' name='"right"' <a id="srcLink">id='srcLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement09.html
new file mode 100644
index 0000000000..344df70670
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameElement09.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frame2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The contentDocument attribute specifies the document this frame contains,
+ if there is any and it is available, or null otherwise.
+
+ Retrieve the contentDocument attribute of the first FRAME element
+ and examine its TITLE value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-78799536
+*/
+function HTMLFrameElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameElement09") != null) return;
+ var testNode;
+ var cd;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frame2");
+ testNode = doc.getElementById("Frame1");
+ cd = testNode.contentDocument;
+
+ vtitle = cd.title;
+
+ assertEquals("titleLink","NIST DOM HTML Test - FRAME",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameElement09</h2>
+<p>&lt;test name='HTMLFrameElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The contentDocument attribute specifies the document this frame contains,
+ if there is any and it is available, or null otherwise.
+
+ Retrieve the contentDocument attribute of the first FRAME element
+ and examine its TITLE value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-03&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-78799536">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-78799536</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cd' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frame2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementById interface='Document' obj='doc' var='testNode' elementId='"Frame1"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentDocument interface='HTMLFrameElement' obj='testNode' var='cd'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLDocument' obj='cd' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NIST DOM HTML Test - FRAMESET"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frame2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement01.html
new file mode 100644
index 0000000000..06f52a0873
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameSetElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frameset");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cols attribute specifies the number of columns of frames in the
+ frameset.
+
+ Retrieve the cols attribute of the first FRAMESET element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98869594
+*/
+function HTMLFrameSetElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameSetElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcols;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frameset");
+ nodeList = doc.getElementsByTagName("frameset");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vcols = testNode.cols;
+
+ assertEquals("colsLink","20, 80",vcols);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement01</h2>
+<p>&lt;test name='HTMLFrameSetElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameSetElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cols attribute specifies the number of columns of frames in the
+ frameset.
+
+ Retrieve the cols attribute of the first FRAMESET element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98869594">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98869594</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcols' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frameset' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frameset"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cols interface='HTMLFrameSetElement' obj='testNode' var='vcols'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcols' expected='"20, 80"' <a id="colsLink">id='colsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frameset.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement02.html
new file mode 100644
index 0000000000..4a767a9d6b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLFrameSetElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLFrameSetElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "frameset");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute specifies the number of rows of frames in the
+ frameset.
+
+ Retrieve the rows attribute of the second FRAMESET element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19739247
+*/
+function HTMLFrameSetElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLFrameSetElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "frameset");
+ nodeList = doc.getElementsByTagName("frameset");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vrows = testNode.rows;
+
+ assertEquals("rowsLink","100, 200",vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLFrameSetElement02</h2>
+<p>&lt;test name='HTMLFrameSetElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLFrameSetElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute specifies the number of rows of frames in the
+ frameset.
+
+ Retrieve the rows attribute of the second FRAMESET element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19739247">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19739247</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='frameset' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"frameset"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLFrameSetElement' obj='testNode' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='"100, 200"' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/frameset.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement01.html
new file mode 100644
index 0000000000..1eadba1215
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHRElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hr");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the rule alignment on the page.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15235012
+*/
+function HTMLHRElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLHRElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hr");
+ nodeList = doc.getElementsByTagName("hr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement01</h2>
+<p>&lt;test name='HTMLHRElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHRElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the rule alignment on the page.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15235012">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15235012</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='hr' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"hr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHRElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/hr.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement02.html
new file mode 100644
index 0000000000..18ad685e81
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHRElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hr");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The noShade attribute specifies that the rule should be drawn as
+ a solid color.
+
+ Retrieve the noShade attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79813978
+*/
+function HTMLHRElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLHRElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vnoshade;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hr");
+ nodeList = doc.getElementsByTagName("hr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vnoshade = testNode.noShade;
+
+ assertTrue("noShadeLink",vnoshade);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement02</h2>
+<p>&lt;test name='HTMLHRElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHRElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The noShade attribute specifies that the rule should be drawn as
+ a solid color.
+
+ Retrieve the noShade attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79813978">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79813978</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnoshade' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='hr' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"hr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noShade interface='HTMLHRElement' obj='testNode' var='vnoshade'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vnoshade' <a id="noShadeLink">id='noShadeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/hr.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement03.html
new file mode 100644
index 0000000000..2820932898
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHRElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hr");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The size attribute specifies the height of the rule.
+
+ Retrieve the size attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77612587
+*/
+function HTMLHRElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLHRElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vsize;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hr");
+ nodeList = doc.getElementsByTagName("hr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vsize = testNode.size;
+
+ assertEquals("sizeLink","5",vsize);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement03</h2>
+<p>&lt;test name='HTMLHRElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHRElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The size attribute specifies the height of the rule.
+
+ Retrieve the size attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77612587">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77612587</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsize' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='hr' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"hr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;size interface='HTMLHRElement' obj='testNode' var='vsize'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsize' expected='"5"' <a id="sizeLink">id='sizeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/hr.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement04.html
new file mode 100644
index 0000000000..301edc1bdb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHRElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHRElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "hr");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the width of the rule.
+
+ Retrieve the width attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87744198
+*/
+function HTMLHRElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLHRElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "hr");
+ nodeList = doc.getElementsByTagName("hr");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","400",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHRElement04</h2>
+<p>&lt;test name='HTMLHRElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHRElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the width of the rule.
+
+ Retrieve the width attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87744198">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87744198</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='hr' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"hr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLHRElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"400"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/hr.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement01.html
new file mode 100644
index 0000000000..df5f7d886a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H1).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h1");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement01</h2>
+<p>&lt;test name='HTMLHeadingElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H1).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h1"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement02.html
new file mode 100644
index 0000000000..e6e8d3b264
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H2).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h2");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","left",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement02</h2>
+<p>&lt;test name='HTMLHeadingElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H2).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h2"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"left"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement03.html
new file mode 100644
index 0000000000..72d16f779f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H3).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h3");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","right",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement03</h2>
+<p>&lt;test name='HTMLHeadingElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H3).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h3"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"right"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement04.html
new file mode 100644
index 0000000000..e50f4dce72
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H4).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h4");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","justify",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement04</h2>
+<p>&lt;test name='HTMLHeadingElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H4).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h4"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"justify"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement05.html
new file mode 100644
index 0000000000..1ea1487337
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H5).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h5");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement05</h2>
+<p>&lt;test name='HTMLHeadingElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H5).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h5"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement06.html
new file mode 100644
index 0000000000..f93610a501
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHeadingElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHeadingElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "heading");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment(H6).
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462
+*/
+function HTMLHeadingElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLHeadingElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "heading");
+ nodeList = doc.getElementsByTagName("h6");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","left",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHeadingElement06</h2>
+<p>&lt;test name='HTMLHeadingElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHeadingElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment(H6).
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6796462</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='heading' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"h6"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLHeadingElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"left"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/heading.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLHtmlElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLHtmlElement01.html
new file mode 100644
index 0000000000..69c90c2adc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLHtmlElement01.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHtmlElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLHtmlElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "html");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The version attribute specifies version information about the document's
+ DTD.
+
+ Retrieve the version attribute and examine its value.
+
+ Test is only applicable to HTML, version attribute is not supported in XHTML.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9383775
+*/
+function HTMLHtmlElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLHtmlElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vversion;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "html");
+ nodeList = doc.getElementsByTagName("html");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vversion = testNode.version;
+
+
+ if(
+
+ (builder.contentType == "text/html")
+
+ ) {
+ assertEquals("versionLink","-//W3C//DTD HTML 4.01 Transitional//EN",vversion);
+
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLHtmlElement01</h2>
+<p>&lt;test name='HTMLHtmlElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLHtmlElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The version attribute specifies version information about the document's
+ DTD.
+
+ Retrieve the version attribute and examine its value.
+
+ Test is only applicable to HTML, version attribute is not supported in XHTML.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9383775">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9383775</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vversion' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='html' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"html"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;version interface='HTMLHtmlElement' obj='testNode' var='vversion'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;if&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentType type='text/html'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vversion' expected='"-//W3C//DTD HTML 4.01 Transitional//EN"' <a id="versionLink">id='versionLink'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/if&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/html.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement01.html
new file mode 100644
index 0000000000..74bc9e5bf3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute aligns this object(vertically or horizontally with
+ respect to its surrounding text.
+
+ Retrieve the align attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11309947
+*/
+function HTMLIFrameElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement01</h2>
+<p>&lt;test name='HTMLIFrameElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute aligns this object(vertically or horizontally with
+ respect to its surrounding text.
+
+ Retrieve the align attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11309947">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11309947</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLIFrameElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement02.html
new file mode 100644
index 0000000000..161b4264e6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement02.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The frameBorder attribute specifies the request for frame borders.
+ (frameBorder=1 A border is drawn)
+ (FrameBorder=0 A border is not drawn)
+
+ Retrieve the frameBorder attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22463410
+*/
+function HTMLIFrameElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vframeborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vframeborder = testNode.frameBorder;
+
+ assertEquals("frameborderLink","1",vframeborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement02</h2>
+<p>&lt;test name='HTMLIFrameElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The frameBorder attribute specifies the request for frame borders.
+ (frameBorder=1 A border is drawn)
+ (FrameBorder=0 A border is not drawn)
+
+ Retrieve the frameBorder attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22463410">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22463410</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vframeborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;frameBorder interface='HTMLIFrameElement' obj='testNode' var='vframeborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vframeborder' expected='"1"' <a id="frameborderLink">id='frameborderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement03.html
new file mode 100644
index 0000000000..c84981f86b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The height attribute specifies the frame height.
+
+ Retrieve the height attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1678118
+*/
+function HTMLIFrameElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","50",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement03</h2>
+<p>&lt;test name='HTMLIFrameElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The height attribute specifies the frame height.
+
+ Retrieve the height attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1678118">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-1678118</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLIFrameElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"50"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement04.html
new file mode 100644
index 0000000000..c8e09efefc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The longDesc attribute specifies a URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute of the first IFRAME element and examine
+ its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70472105
+*/
+function HTMLIFrameElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vlongdesc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlongdesc = testNode.longDesc;
+
+ assertEquals("longdescLink","about:blank",vlongdesc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement04</h2>
+<p>&lt;test name='HTMLIFrameElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The longDesc attribute specifies a URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute of the first IFRAME element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70472105">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70472105</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlongdesc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;longDesc interface='HTMLIFrameElement' obj='testNode' var='vlongdesc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlongdesc' expected='"about:blank"' ignoreCase='false' <a id="longdescLink">id='longdescLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement05.html
new file mode 100644
index 0000000000..66fb0fc39d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The marginWidth attribute specifies the frame margin width, in pixels.
+
+ Retrieve the marginWidth attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66486595
+*/
+function HTMLIFrameElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vmarginwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vmarginwidth = testNode.marginWidth;
+
+ assertEquals("marginwidthLink","5",vmarginwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement05</h2>
+<p>&lt;test name='HTMLIFrameElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The marginWidth attribute specifies the frame margin width, in pixels.
+
+ Retrieve the marginWidth attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66486595">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66486595</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmarginwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;marginWidth interface='HTMLIFrameElement' obj='testNode' var='vmarginwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmarginwidth' expected='"5"' <a id="marginwidthLink">id='marginwidthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement06.html
new file mode 100644
index 0000000000..8efbabba8f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement06.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The marginHeight attribute specifies the frame margin height, in pixels.
+
+ Retrieve the marginHeight attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91371294
+*/
+function HTMLIFrameElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vmarginheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vmarginheight = testNode.marginHeight;
+
+ assertEquals("marginheightLink","10",vmarginheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement06</h2>
+<p>&lt;test name='HTMLIFrameElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The marginHeight attribute specifies the frame margin height, in pixels.
+
+ Retrieve the marginHeight attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91371294">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91371294</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmarginheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;marginHeight interface='HTMLIFrameElement' obj='testNode' var='vmarginheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmarginheight' expected='"10"' <a id="marginheightLink">id='marginheightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement07.html
new file mode 100644
index 0000000000..4bb0465f4d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the frame name(object of the target
+ attribute).
+
+ Retrieve the name attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96819659
+*/
+function HTMLIFrameElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","Iframe1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement07</h2>
+<p>&lt;test name='HTMLIFrameElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the frame name(object of the target
+ attribute).
+
+ Retrieve the name attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96819659">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96819659</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLIFrameElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"Iframe1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement08.html
new file mode 100644
index 0000000000..78d8445ce5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement08.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The scrolling attribute specifies whether or not the frame should have
+ scrollbars.
+
+ Retrieve the scrolling attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36369822
+*/
+function HTMLIFrameElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vscrolling;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vscrolling = testNode.scrolling;
+
+ assertEquals("scrollingLink","yes",vscrolling);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement08</h2>
+<p>&lt;test name='HTMLIFrameElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The scrolling attribute specifies whether or not the frame should have
+ scrollbars.
+
+ Retrieve the scrolling attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36369822">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36369822</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscrolling' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scrolling interface='HTMLIFrameElement' obj='testNode' var='vscrolling'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscrolling' expected='"yes"' <a id="scrollingLink">id='scrollingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement09.html
new file mode 100644
index 0000000000..c44d2a9a82
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The src attribute specifies a URI designating the initial frame contents.
+
+ Retrieve the src attribute of the first FRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43933957
+*/
+function HTMLIFrameElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vsrc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vsrc = testNode.src;
+
+ assertURIEquals("srcLink",null,null,null,null,"right",null,null,null,vsrc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement09</h2>
+<p>&lt;test name='HTMLIFrameElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The src attribute specifies a URI designating the initial frame contents.
+
+ Retrieve the src attribute of the first FRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43933957">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43933957</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsrc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;src interface='HTMLIFrameElement' obj='testNode' var='vsrc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vsrc' name='"right"' <a id="srcLink">id='srcLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement10.html
new file mode 100644
index 0000000000..241740df36
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement10.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the frame width.
+
+ Retrieve the width attribute of the first IFRAME element and examine
+ it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67133005
+*/
+function HTMLIFrameElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe");
+ nodeList = doc.getElementsByTagName("iframe");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","60",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement10</h2>
+<p>&lt;test name='HTMLIFrameElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the frame width.
+
+ Retrieve the width attribute of the first IFRAME element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67133005">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67133005</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"iframe"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLIFrameElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"60"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement11.html
new file mode 100644
index 0000000000..a53e0cab28
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLIFrameElement11.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLIFrameElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "iframe2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ Retrieve the contentDocument attribute of the second IFRAME element
+ and examine its title.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-67133006
+*/
+function HTMLIFrameElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLIFrameElement11") != null) return;
+ var testNode;
+ var cd;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "iframe2");
+ testNode = doc.getElementById("Iframe2");
+ cd = testNode.contentDocument;
+
+ vtitle = cd.title;
+
+ assertEquals("titleLink","NIST DOM HTML Test - FRAME",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLIFrameElement11</h2>
+<p>&lt;test name='HTMLIFrameElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLIFrameElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ Retrieve the contentDocument attribute of the second IFRAME element
+ and examine its title.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-03&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-67133006">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-67133006</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cd' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='iframe2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementById interface='Document' obj='doc' var='testNode' elementId='"Iframe2"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentDocument interface='HTMLIFrameElement' obj='testNode' var='cd'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLDocument' obj='cd' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NIST DOM HTML Test - FRAME"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/iframe2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement01.html
new file mode 100644
index 0000000000..187152d5a6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the name of the element.
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47534097
+*/
+function HTMLImageElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","IMAGE-1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement01</h2>
+<p>&lt;test name='HTMLImageElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the name of the element.
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47534097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47534097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLImageElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"IMAGE-1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement02.html
new file mode 100644
index 0000000000..73fdaa3a84
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute aligns this object with respect to its surrounding
+ text.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3211094
+*/
+function HTMLImageElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","middle",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement02</h2>
+<p>&lt;test name='HTMLImageElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute aligns this object with respect to its surrounding
+ text.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3211094">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-3211094</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLImageElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"middle"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement03.html
new file mode 100644
index 0000000000..cb1c741426
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The alt attribute specifies an alternative text for user agenst not
+ rendering the normal content of this element.
+
+ Retrieve the alt attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95636861
+*/
+function HTMLImageElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var valt;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valt = testNode.alt;
+
+ assertEquals("altLink","DTS IMAGE LOGO",valt);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement03</h2>
+<p>&lt;test name='HTMLImageElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The alt attribute specifies an alternative text for user agenst not
+ rendering the normal content of this element.
+
+ Retrieve the alt attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95636861">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95636861</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valt' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;alt interface='HTMLImageElement' obj='testNode' var='valt'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valt' expected='"DTS IMAGE LOGO"' <a id="altLink">id='altLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement04.html
new file mode 100644
index 0000000000..704a4baeaf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The border attribute specifies the width of the border around the image.
+
+ Retrieve the border attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-136671
+*/
+function HTMLImageElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vborder = testNode.border;
+
+ assertEquals("borderLink","0",vborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement04</h2>
+<p>&lt;test name='HTMLImageElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The border attribute specifies the width of the border around the image.
+
+ Retrieve the border attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-136671">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-136671</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;border interface='HTMLImageElement' obj='testNode' var='vborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vborder' expected='"0"' <a id="borderLink">id='borderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement05.html
new file mode 100644
index 0000000000..f67477065f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The height attribute overrides the natural "height" of the image.
+
+ Retrieve the height attribute and examine it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-91561496
+*/
+function HTMLImageElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vheight = testNode.height;
+
+ assertEquals("heightLink",47,vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement05</h2>
+<p>&lt;test name='HTMLImageElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The height attribute overrides the natural "height" of the image.
+
+ Retrieve the height attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-26&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-91561496">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-91561496</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLImageElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='47' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement06.html
new file mode 100644
index 0000000000..0f977f2932
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement06.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The hspace attribute specifies the horizontal space to the left and
+ right of this image.
+
+ Retrieve the hspace attribute and examine it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-53675471
+*/
+function HTMLImageElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vhspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhspace = testNode.hspace;
+
+ assertEquals("hspaceLink",4,vhspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement06</h2>
+<p>&lt;test name='HTMLImageElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The hspace attribute specifies the horizontal space to the left and
+ right of this image.
+
+ Retrieve the hspace attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-26&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-53675471">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-53675471</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hspace interface='HTMLImageElement' obj='testNode' var='vhspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhspace' expected='4' <a id="hspaceLink">id='hspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement07.html
new file mode 100644
index 0000000000..60d513edeb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The isMap attribute indicates the use of server-side image map.
+
+ Retrieve the isMap attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58983880
+*/
+function HTMLImageElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vismap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vismap = testNode.isMap;
+
+ assertFalse("isMapLink",vismap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement07</h2>
+<p>&lt;test name='HTMLImageElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The isMap attribute indicates the use of server-side image map.
+
+ Retrieve the isMap attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58983880">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58983880</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vismap' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;isMap interface='HTMLImageElement' obj='testNode' var='vismap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='vismap' <a id="isMapLink">id='isMapLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement08.html
new file mode 100644
index 0000000000..2f12bac200
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The longDesc attribute contains an URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77376969
+*/
+function HTMLImageElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vlongdesc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vlongdesc = testNode.longDesc;
+
+ assertURIEquals("longDescLink",null,null,null,"desc.html",null,null,null,null,vlongdesc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement08</h2>
+<p>&lt;test name='HTMLImageElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The longDesc attribute contains an URI designating a long description
+ of this image or frame.
+
+ Retrieve the longDesc attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77376969">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77376969</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlongdesc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;longDesc interface='HTMLImageElement' obj='testNode' var='vlongdesc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vlongdesc' file='"desc.html"' <a id="longDescLink">id='longDescLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement09.html
new file mode 100644
index 0000000000..f3a648d680
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement09.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The src attribute contains an URI designating the source of this image.
+
+ Retrieve the src attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87762984
+*/
+function HTMLImageElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vsrc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vsrc = testNode.src;
+
+ assertURIEquals("srcLink",null,null,null,"dts.gif",null,null,null,null,vsrc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement09</h2>
+<p>&lt;test name='HTMLImageElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The src attribute contains an URI designating the source of this image.
+
+ Retrieve the src attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87762984">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87762984</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsrc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;src interface='HTMLImageElement' obj='testNode' var='vsrc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vsrc' file='"dts.gif"' <a id="srcLink">id='srcLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement10.html
new file mode 100644
index 0000000000..b1b64db783
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement10.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The useMap attribute specifies to use the client-side image map.
+
+ Retrieve the useMap attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35981181
+*/
+function HTMLImageElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vusemap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vusemap = testNode.useMap;
+
+ assertEquals("useMapLink","#DTS-MAP",vusemap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement10</h2>
+<p>&lt;test name='HTMLImageElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The useMap attribute specifies to use the client-side image map.
+
+ Retrieve the useMap attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35981181">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35981181</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vusemap' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;useMap interface='HTMLImageElement' obj='testNode' var='vusemap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vusemap' expected='"#DTS-MAP"' <a id="useMapLink">id='useMapLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement11.html
new file mode 100644
index 0000000000..56b654d7ab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement11.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vspace attribute specifies the vertical space above and below this
+ image.
+
+ Retrieve the vspace attribute and examine it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-85374897
+*/
+function HTMLImageElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vvspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvspace = testNode.vspace;
+
+ assertEquals("vspaceLink",10,vvspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement11</h2>
+<p>&lt;test name='HTMLImageElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vspace attribute specifies the vertical space above and below this
+ image.
+
+ Retrieve the vspace attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-26&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-85374897">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-85374897</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vspace interface='HTMLImageElement' obj='testNode' var='vvspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvspace' expected='10' <a id="vspaceLink">id='vspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement12.html
new file mode 100644
index 0000000000..0861258fc2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLImageElement12.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLImageElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "img");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute overrides the natural "width" of the image.
+
+ Retrieve the width attribute and examine it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13839076
+*/
+function HTMLImageElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLImageElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "img");
+ nodeList = doc.getElementsByTagName("img");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink",115,vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLImageElement12</h2>
+<p>&lt;test name='HTMLImageElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLImageElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute overrides the natural "width" of the image.
+
+ Retrieve the width attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13839076">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13839076</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='img' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"img"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLImageElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='115' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/img.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement01.html
new file mode 100644
index 0000000000..98919e5427
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The defaultValue attribute represents the HTML value of the attribute
+ when the type attribute has the value of "Text", "File" or "Password".
+
+ Retrieve the defaultValue attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26091157
+*/
+function HTMLInputElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vdefaultvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vdefaultvalue = testNode.defaultValue;
+
+ assertEquals("defaultValueLink","Password",vdefaultvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement01</h2>
+<p>&lt;test name='HTMLInputElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The defaultValue attribute represents the HTML value of the attribute
+ when the type attribute has the value of "Text", "File" or "Password".
+
+ Retrieve the defaultValue attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26091157">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26091157</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdefaultvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defaultValue interface='HTMLInputElement' obj='testNode' var='vdefaultvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdefaultvalue' expected='"Password"' <a id="defaultValueLink">id='defaultValueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement02.html
new file mode 100644
index 0000000000..12fda82550
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The defaultChecked attribute represents the HTML checked attribute of
+ the element when the type attribute has the value checkbox or radio.
+
+ Retrieve the defaultValue attribute of the 4th INPUT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20509171
+*/
+function HTMLInputElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vdefaultchecked;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(3);
+ vdefaultchecked = testNode.defaultChecked;
+
+ assertTrue("defaultCheckedLink",vdefaultchecked);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement02</h2>
+<p>&lt;test name='HTMLInputElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The defaultChecked attribute represents the HTML checked attribute of
+ the element when the type attribute has the value checkbox or radio.
+
+ Retrieve the defaultValue attribute of the 4th INPUT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20509171">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20509171</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdefaultchecked' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defaultChecked interface='HTMLInputElement' obj='testNode' var='vdefaultchecked'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdefaultchecked' <a id="defaultCheckedLink">id='defaultCheckedLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement03.html
new file mode 100644
index 0000000000..94b46e3d19
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement03.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute of the 1st INPUT element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63239895
+*/
+function HTMLInputElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement03</h2>
+<p>&lt;test name='HTMLInputElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute of the 1st INPUT element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63239895">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63239895</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLInputElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement04.html
new file mode 100644
index 0000000000..e74f1547ca
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accept attribute is a comma-seperated list of content types that
+ a server processing this form will handle correctly.
+
+ Retrieve the accept attribute of the 9th INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15328520
+*/
+function HTMLInputElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccept;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(8);
+ vaccept = testNode.accept;
+
+ assertEquals("acceptLink","GIF,JPEG",vaccept);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement04</h2>
+<p>&lt;test name='HTMLInputElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accept attribute is a comma-seperated list of content types that
+ a server processing this form will handle correctly.
+
+ Retrieve the accept attribute of the 9th INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15328520">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15328520</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccept' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='8'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accept interface='HTMLInputElement' obj='testNode' var='vaccept'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccept' expected='"GIF,JPEG"' <a id="acceptLink">id='acceptLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement05.html
new file mode 100644
index 0000000000..369add7bd0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement05.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute of the 2nd INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59914154
+*/
+function HTMLInputElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(1);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accesskeyLink","c",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement05</h2>
+<p>&lt;test name='HTMLInputElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute of the 2nd INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59914154">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59914154</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLInputElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"c"' <a id="accesskeyLink">id='accesskeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement06.html
new file mode 100644
index 0000000000..354c90cee2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute aligns this object(vertically or horizontally)
+ with respect to the surrounding text.
+
+ Retrieve the align attribute of the 4th INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96991182
+*/
+function HTMLInputElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(3);
+ valign = testNode.align;
+
+ assertEquals("alignLink","bottom".toLowerCase(),valign.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement06</h2>
+<p>&lt;test name='HTMLInputElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute aligns this object(vertically or horizontally)
+ with respect to the surrounding text.
+
+ Retrieve the align attribute of the 4th INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96991182">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96991182</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLInputElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"bottom"' <a id="alignLink">id='alignLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement07.html
new file mode 100644
index 0000000000..37068e9d64
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The alt attribute alternates text for user agents not rendering the
+ normal content of this element.
+
+ Retrieve the alt attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92701314
+*/
+function HTMLInputElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var valt;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ valt = testNode.alt;
+
+ assertEquals("altLink","Password entry",valt);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement07</h2>
+<p>&lt;test name='HTMLInputElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The alt attribute alternates text for user agents not rendering the
+ normal content of this element.
+
+ Retrieve the alt attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92701314">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92701314</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valt' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;alt interface='HTMLInputElement' obj='testNode' var='valt'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valt' expected='"Password entry"' <a id="altLink">id='altLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement08.html
new file mode 100644
index 0000000000..0147f10ec1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement08.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The checked attribute represents the current state of the corresponding
+ form control when type has the value Radio or Checkbox.
+
+ Retrieve the accept attribute of the 3rd INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30233917
+*/
+function HTMLInputElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vchecked;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(2);
+ vchecked = testNode.checked;
+
+ assertTrue("checkedLink",vchecked);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement08</h2>
+<p>&lt;test name='HTMLInputElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The checked attribute represents the current state of the corresponding
+ form control when type has the value Radio or Checkbox.
+
+ Retrieve the accept attribute of the 3rd INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30233917">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30233917</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchecked' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;checked interface='HTMLInputElement' obj='testNode' var='vchecked'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vchecked' <a id="checkedLink">id='checkedLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement09.html
new file mode 100644
index 0000000000..fbc9383e41
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute has a TRUE value if it is explicitly set.
+
+ Retrieve the disabled attribute of the 7th INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50886781
+*/
+function HTMLInputElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(6);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement09</h2>
+<p>&lt;test name='HTMLInputElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute has a TRUE value if it is explicitly set.
+
+ Retrieve the disabled attribute of the 7th INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50886781">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50886781</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLInputElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement10.html
new file mode 100644
index 0000000000..545c5a3bf6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The maxLength attribute is the maximum number of text characters for text
+ fields, when type has the value of Text or Password.
+
+ Retrieve the maxLenght attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-54719353
+*/
+function HTMLInputElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vmaxlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vmaxlength = testNode.maxLength;
+
+ assertEquals("maxlengthLink",5,vmaxlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement10</h2>
+<p>&lt;test name='HTMLInputElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The maxLength attribute is the maximum number of text characters for text
+ fields, when type has the value of Text or Password.
+
+ Retrieve the maxLenght attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-54719353">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-54719353</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmaxlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;maxLength interface='HTMLInputElement' obj='testNode' var='vmaxlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmaxlength' expected='5' <a id="maxlengthLink">id='maxlengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement11.html
new file mode 100644
index 0000000000..384fc3f42b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute is the form control or object name when submitted with
+ a form.
+
+ Retrieve the name attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89658498
+*/
+function HTMLInputElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","Password",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement11</h2>
+<p>&lt;test name='HTMLInputElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute is the form control or object name when submitted with
+ a form.
+
+ Retrieve the name attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89658498">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89658498</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLInputElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"Password"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement12.html
new file mode 100644
index 0000000000..7045d724c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement12.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The readOnly attribute indicates that this control is read-only when
+ type has a value of text or password only.
+
+ Retrieve the readOnly attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88461592
+*/
+function HTMLInputElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vreadonly;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vreadonly = testNode.readOnly;
+
+ assertTrue("readonlyLink",vreadonly);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement12</h2>
+<p>&lt;test name='HTMLInputElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The readOnly attribute indicates that this control is read-only when
+ type has a value of text or password only.
+
+ Retrieve the readOnly attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88461592">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88461592</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vreadonly' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;readOnly interface='HTMLInputElement' obj='testNode' var='vreadonly'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vreadonly' <a id="readonlyLink">id='readonlyLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement13.html
new file mode 100644
index 0000000000..643d392553
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement13.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The size attribute contains the size information. Its precise meaning
+ is specific to each type of field.
+
+ Retrieve the size attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-79659438
+*/
+function HTMLInputElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vsize;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vsize = testNode.size;
+
+ assertEquals("size",25,vsize);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement13</h2>
+<p>&lt;test name='HTMLInputElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The size attribute contains the size information. Its precise meaning
+ is specific to each type of field.
+
+ Retrieve the size attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2001-12-26&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-79659438">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-79659438</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsize' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;size interface='HTMLInputElement' obj='testNode' var='vsize'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsize' expected='25' <a id="size">id='size'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement14.html
new file mode 100644
index 0000000000..ebc2c0402a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement14.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The src attribute specifies the location of the image to decorate the
+ graphical submit button when the type has the value Image.
+
+ Retrieve the src attribute of the 8th INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-97320704
+*/
+function HTMLInputElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var vsrc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(7);
+ vsrc = testNode.src;
+
+ assertURIEquals("srcLink",null,null,null,"submit.gif",null,null,null,null,vsrc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement14</h2>
+<p>&lt;test name='HTMLInputElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The src attribute specifies the location of the image to decorate the
+ graphical submit button when the type has the value Image.
+
+ Retrieve the src attribute of the 8th INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-97320704">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-97320704</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsrc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='7'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;src interface='HTMLInputElement' obj='testNode' var='vsrc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vsrc' file='"submit.gif"' <a id="srcLink">id='srcLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement15.html
new file mode 100644
index 0000000000..51ce20e629
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement15.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute is an index that represents the elements position
+ in the tabbing order.
+
+ Retrieve the tabIndex attribute of the 3rd INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62176355
+*/
+function HTMLInputElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(2);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabindexLink",9,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement15</h2>
+<p>&lt;test name='HTMLInputElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute is an index that represents the elements position
+ in the tabbing order.
+
+ Retrieve the tabIndex attribute of the 3rd INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62176355">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62176355</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLInputElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='9' <a id="tabindexLink">id='tabindexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement16.html
new file mode 100644
index 0000000000..c88e2497d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement16.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute is the type of control created.
+
+ Retrieve the type attribute of the 1st INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62883744
+*/
+function HTMLInputElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","password",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement16</h2>
+<p>&lt;test name='HTMLInputElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute is the type of control created.
+
+ Retrieve the type attribute of the 1st INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62883744">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62883744</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLInputElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"password"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement17.html
new file mode 100644
index 0000000000..924a3b7a1b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement17.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The useMap attribute specifies the use of the client-side image map.
+
+ Retrieve the useMap attribute of the 8th INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32463706
+*/
+function HTMLInputElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var vusemap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(7);
+ vusemap = testNode.useMap;
+
+ assertEquals("usemapLink","#submit-map",vusemap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement17</h2>
+<p>&lt;test name='HTMLInputElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The useMap attribute specifies the use of the client-side image map.
+
+ Retrieve the useMap attribute of the 8th INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32463706">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32463706</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vusemap' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='7'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;useMap interface='HTMLInputElement' obj='testNode' var='vusemap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vusemap' expected='"#submit-map"' <a id="usemapLink">id='usemapLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement18.html
new file mode 100644
index 0000000000..d95f9845c4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement18.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute is the current content of the corresponding form
+ control when the type attribute has the value Text, File or Password.
+
+ Retrieve the value attribute of the 2nd INPUT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49531485
+*/
+function HTMLInputElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(1);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink","ReHire",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement18</h2>
+<p>&lt;test name='HTMLInputElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute is the current content of the corresponding form
+ control when the type attribute has the value Text, File or Password.
+
+ Retrieve the value attribute of the 2nd INPUT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49531485">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49531485</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLInputElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"ReHire"' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement19.html
new file mode 100644
index 0000000000..75436630a8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement19.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLInputElement.blur should surrender input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26838235
+*/
+function HTMLInputElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(1);
+ testNode.blur();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement19</h2>
+<p>&lt;test name='HTMLInputElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLInputElement.blur should surrender input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26838235">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26838235</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;blur interface='HTMLInputElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement20.html
new file mode 100644
index 0000000000..81345a94f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement20.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLInputElement.focus should capture input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65996295
+*/
+function HTMLInputElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(1);
+ testNode.focus();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement20</h2>
+<p>&lt;test name='HTMLInputElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLInputElement.focus should capture input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65996295">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-65996295</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;focus interface='HTMLInputElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement21.html
new file mode 100644
index 0000000000..6e2d0ac5da
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement21.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLInputElement.click should change the state of checked on a radio button.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2651361
+*/
+function HTMLInputElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement21") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var checked;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(1);
+ checked = testNode.checked;
+
+ assertFalse("notCheckedBeforeClick",checked);
+testNode.click();
+ checked = testNode.checked;
+
+ assertTrue("checkedAfterClick",checked);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement21</h2>
+<p>&lt;test name='HTMLInputElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLInputElement.click should change the state of checked on a radio button.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2651361">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-2651361</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='checked' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;checked var='checked' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='checked' <a id="notCheckedBeforeClick">id='notCheckedBeforeClick'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;click interface='HTMLInputElement' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;checked var='checked' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='checked' <a id="checkedAfterClick">id='checkedAfterClick'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement22.html b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement22.html
new file mode 100644
index 0000000000..68da44c48c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLInputElement22.html
@@ -0,0 +1,127 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLInputElement22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "input");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+HTMLInputElement.select should select the contents of a text area.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34677168
+*/
+function HTMLInputElement22() {
+ var success;
+ if(checkInitialization(builder, "HTMLInputElement22") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var checked;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "input");
+ nodeList = doc.getElementsByTagName("input");
+ assertSize("Asize",9,nodeList);
+testNode = nodeList.item(0);
+ testNode.select();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLInputElement22</h2>
+<p>&lt;test name='HTMLInputElement22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLInputElement22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+HTMLInputElement.select should select the contents of a text area.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34677168">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-34677168</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='checked' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='input' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"input"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='9' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select interface='HTMLInputElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/input.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement01.html
new file mode 100644
index 0000000000..c4cbcf4fba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLIElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLIElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "li");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute is a list item bullet style.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52387668
+*/
+function HTMLLIElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLLIElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "li");
+ nodeList = doc.getElementsByTagName("li");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","square",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLIElement01</h2>
+<p>&lt;test name='HTMLLIElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLIElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute is a list item bullet style.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52387668">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52387668</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='li' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"li"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLLIElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"square"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/li.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement02.html
new file mode 100644
index 0000000000..d4a1fb7ad0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLIElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLIElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLIElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "li");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute is a reset sequence number when used in OL.
+
+ Retrieve the value attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45496263
+*/
+function HTMLLIElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLLIElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "li");
+ nodeList = doc.getElementsByTagName("li");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink",2,vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLIElement02</h2>
+<p>&lt;test name='HTMLLIElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLIElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute is a reset sequence number when used in OL.
+
+ Retrieve the value attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45496263">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-45496263</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='li' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"li"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLLIElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='2' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/li.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement01.html
new file mode 100644
index 0000000000..769273fd2c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement01.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLabelElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "label");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901
+*/
+function HTMLLabelElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLLabelElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "label");
+ nodeList = doc.getElementsByTagName("label");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement01</h2>
+<p>&lt;test name='HTMLLabelElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLabelElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='label' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"label"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLLabelElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/label.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement02.html
new file mode 100644
index 0000000000..bbeb70fc05
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLabelElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "label");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901
+*/
+function HTMLLabelElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLLabelElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "label");
+ nodeList = doc.getElementsByTagName("label");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement02</h2>
+<p>&lt;test name='HTMLLabelElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLabelElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32480901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='label' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"label"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLLabelElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/label.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement03.html
new file mode 100644
index 0000000000..b6adb084c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLabelElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "label");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43589892
+*/
+function HTMLLabelElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLLabelElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "label");
+ nodeList = doc.getElementsByTagName("label");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accesskeyLink","b",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement03</h2>
+<p>&lt;test name='HTMLLabelElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLabelElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43589892">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-43589892</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='label' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"label"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLLabelElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"b"' <a id="accesskeyLink">id='accesskeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/label.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement04.html
new file mode 100644
index 0000000000..52b287f56f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLabelElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLabelElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "label");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The htmlFor attribute links this label with another form control by
+ id attribute.
+
+ Retrieve the htmlFor attribute of the first LABEL element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96509813
+*/
+function HTMLLabelElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLLabelElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vhtmlfor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "label");
+ nodeList = doc.getElementsByTagName("label");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vhtmlfor = testNode.htmlFor;
+
+ assertEquals("htmlForLink","input1",vhtmlfor);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLabelElement04</h2>
+<p>&lt;test name='HTMLLabelElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLabelElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The htmlFor attribute links this label with another form control by
+ id attribute.
+
+ Retrieve the htmlFor attribute of the first LABEL element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96509813">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96509813</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhtmlfor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='label' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"label"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;htmlFor interface='HTMLLabelElement' obj='testNode' var='vhtmlfor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhtmlfor' expected='"input1"' <a id="htmlForLink">id='htmlForLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/label.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement01.html
new file mode 100644
index 0000000000..fe5dca94f2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement01.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLegendElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "legend");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first LEGEND element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519
+*/
+function HTMLLegendElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLLegendElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "legend");
+ nodeList = doc.getElementsByTagName("legend");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement01</h2>
+<p>&lt;test name='HTMLLegendElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLLegendElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first LEGEND element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='legend' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"legend"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLLegendElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/legend.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement02.html
new file mode 100644
index 0000000000..5d7895685b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLegendElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "legend");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the second ELEMENT and examine its form element.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519
+*/
+function HTMLLegendElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLLegendElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "legend");
+ nodeList = doc.getElementsByTagName("legend");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement02</h2>
+<p>&lt;test name='HTMLLegendElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLegendElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the second ELEMENT and examine its form element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-29594519</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='legend' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"legend"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLLegendElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/legend.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement03.html
new file mode 100644
index 0000000000..50694fc20a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLegendElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "legend");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11297832
+*/
+function HTMLLegendElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLLegendElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "legend");
+ nodeList = doc.getElementsByTagName("legend");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accesskeyLink","b",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement03</h2>
+<p>&lt;test name='HTMLLegendElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLegendElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute is a single character access key to give access
+ to the form control.
+
+ Retrieve the accessKey attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11297832">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11297832</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='legend' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"legend"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLLegendElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"b"' <a id="accesskeyLink">id='accesskeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/legend.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement04.html
new file mode 100644
index 0000000000..a1fae91dce
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLegendElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLegendElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "legend");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the text alignment relative to FIELDSET.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79538067
+*/
+function HTMLLegendElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLLegendElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "legend");
+ nodeList = doc.getElementsByTagName("legend");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLegendElement04</h2>
+<p>&lt;test name='HTMLLegendElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLegendElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the text alignment relative to FIELDSET.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79538067">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79538067</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='legend' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"legend"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLLegendElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/legend.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement01.html
new file mode 100644
index 0000000000..646f0c0de2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute enables/disables the link.
+
+ Retrieve the disabled attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87355129
+*/
+function HTMLLinkElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vdisabled = testNode.disabled;
+
+ assertFalse("disabled",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement01</h2>
+<p>&lt;test name='HTMLLinkElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute enables/disables the link.
+
+ Retrieve the disabled attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87355129">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87355129</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLLinkElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='vdisabled' <a id="disabled">id='disabled'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement02.html
new file mode 100644
index 0000000000..f2563cdfa2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charset attribute indicates the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63954491
+*/
+function HTMLLinkElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharset;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vcharset = testNode.charset;
+
+ assertEquals("charsetLink","Latin-1",vcharset);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement02</h2>
+<p>&lt;test name='HTMLLinkElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charset attribute indicates the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63954491">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63954491</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharset' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;charset interface='HTMLLinkElement' obj='testNode' var='vcharset'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharset' expected='"Latin-1"' <a id="charsetLink">id='charsetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement03.html
new file mode 100644
index 0000000000..6abc60f5d6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The href attribute specifies the URI of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33532588
+*/
+function HTMLLinkElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vhref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vhref = testNode.href;
+
+ assertURIEquals("hrefLink",null,null,null,"glossary.html",null,null,null,null,vhref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement03</h2>
+<p>&lt;test name='HTMLLinkElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The href attribute specifies the URI of the linked resource.
+
+ Retrieve the href attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33532588">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33532588</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhref' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;href interface='HTMLLinkElement' obj='testNode' var='vhref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vhref' file='"glossary.html"' <a id="hrefLink">id='hrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement04.html
new file mode 100644
index 0000000000..9589ded343
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The hreflang attribute specifies the language code of the linked resource.
+
+ Retrieve the hreflang attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85145682
+*/
+function HTMLLinkElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vhreflang;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vhreflang = testNode.hreflang;
+
+ assertEquals("hreflangLink","en",vhreflang);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement04</h2>
+<p>&lt;test name='HTMLLinkElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The hreflang attribute specifies the language code of the linked resource.
+
+ Retrieve the hreflang attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85145682">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85145682</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhreflang' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hreflang interface='HTMLLinkElement' obj='testNode' var='vhreflang'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhreflang' expected='"en"' <a id="hreflangLink">id='hreflangLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement05.html
new file mode 100644
index 0000000000..f5e21e3f1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The media attribute specifies the targeted media.
+
+ Retrieve the media attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75813125
+*/
+function HTMLLinkElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vmedia;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vmedia = testNode.media;
+
+ assertEquals("mediaLink","screen",vmedia);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement05</h2>
+<p>&lt;test name='HTMLLinkElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The media attribute specifies the targeted media.
+
+ Retrieve the media attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75813125">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75813125</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmedia' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;media interface='HTMLLinkElement' obj='testNode' var='vmedia'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmedia' expected='"screen"' <a id="mediaLink">id='mediaLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement06.html
new file mode 100644
index 0000000000..151fcd50c5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement06.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rel attribute specifies the forward link type.
+
+ Retrieve the rel attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41369587
+*/
+function HTMLLinkElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vrel;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vrel = testNode.rel;
+
+ assertEquals("relLink","Glossary",vrel);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement06</h2>
+<p>&lt;test name='HTMLLinkElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rel attribute specifies the forward link type.
+
+ Retrieve the rel attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41369587">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41369587</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrel' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rel interface='HTMLLinkElement' obj='testNode' var='vrel'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrel' expected='"Glossary"' <a id="relLink">id='relLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement07.html
new file mode 100644
index 0000000000..28b2f7794a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement07.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rev attribute specifies the reverse link type.
+
+ Retrieve the rev attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40715461
+*/
+function HTMLLinkElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vrev;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vrev = testNode.rev;
+
+ assertEquals("revLink","stylesheet",vrev);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement07</h2>
+<p>&lt;test name='HTMLLinkElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rev attribute specifies the reverse link type.
+
+ Retrieve the rev attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40715461">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40715461</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrev' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rev interface='HTMLLinkElement' obj='testNode' var='vrev'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrev' expected='"stylesheet"' <a id="revLink">id='revLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement08.html
new file mode 100644
index 0000000000..fe8373ad84
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement08.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the advisory content type.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32498296
+*/
+function HTMLLinkElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","text/html",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement08</h2>
+<p>&lt;test name='HTMLLinkElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the advisory content type.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32498296">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32498296</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLLinkElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"text/html"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement09.html
new file mode 100644
index 0000000000..9e1f95129e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLLinkElement09.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLLinkElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "link2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The target attribute specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84183095
+*/
+function HTMLLinkElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLLinkElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vtarget;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "link2");
+ nodeList = doc.getElementsByTagName("link");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtarget = testNode.target;
+
+ assertEquals("targetLink","dynamic",vtarget);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLLinkElement09</h2>
+<p>&lt;test name='HTMLLinkElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLLinkElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The target attribute specifies the frame to render the resource in.
+
+ Retrieve the target attribute and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84183095">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84183095</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtarget' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='link2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"link"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;target interface='HTMLLinkElement' obj='testNode' var='vtarget'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtarget' expected='"dynamic"' <a id="targetLink">id='targetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/link2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement01.html
new file mode 100644
index 0000000000..1ced2c0995
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement01.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMapElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMapElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "map");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The areas attribute is a list of areas defined for the image map.
+
+ Retrieve the areas attribute and find the number of areas defined.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71838730
+*/
+function HTMLMapElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLMapElement01") != null) return;
+ var nodeList;
+ var areasnodeList;
+ var testNode;
+ var vareas;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "map");
+ nodeList = doc.getElementsByTagName("map");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ areasnodeList = testNode.areas;
+
+ vareas = areasnodeList.length;
+
+ assertEquals("areasLink",3,vareas);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMapElement01</h2>
+<p>&lt;test name='HTMLMapElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMapElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The areas attribute is a list of areas defined for the image map.
+
+ Retrieve the areas attribute and find the number of areas defined.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71838730">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71838730</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='areasnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vareas' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='map' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"map"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;areas interface='HTMLMapElement' obj='testNode' var='areasnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='areasnodeList' var='vareas'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vareas' expected='3' <a id="areasLink">id='areasLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/map.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement02.html
new file mode 100644
index 0000000000..d65deb3956
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMapElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMapElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMapElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "map");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute names the map(for use with usemap).
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52696514
+*/
+function HTMLMapElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLMapElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "map");
+ nodeList = doc.getElementsByTagName("map");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("mapLink","mapid",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMapElement02</h2>
+<p>&lt;test name='HTMLMapElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMapElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute names the map(for use with usemap).
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52696514">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52696514</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='map' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"map"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLMapElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"mapid"' <a id="mapLink">id='mapLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/map.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMenuElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMenuElement01.html
new file mode 100644
index 0000000000..0f37aff79c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMenuElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMenuElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMenuElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "menu");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68436464
+*/
+function HTMLMenuElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLMenuElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "menu");
+ nodeList = doc.getElementsByTagName("menu");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMenuElement01</h2>
+<p>&lt;test name='HTMLMenuElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMenuElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68436464">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68436464</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='menu' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"menu"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLMenuElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/menu.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement01.html
new file mode 100644
index 0000000000..bc84b775b1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMetaElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "meta");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The content attribute specifies associated information.
+
+ Retrieve the content attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87670826
+*/
+function HTMLMetaElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLMetaElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcontent;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "meta");
+ nodeList = doc.getElementsByTagName("meta");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcontent = testNode.content;
+
+ assertEquals("contentLink","text/html; CHARSET=utf-8",vcontent);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement01</h2>
+<p>&lt;test name='HTMLMetaElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMetaElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The content attribute specifies associated information.
+
+ Retrieve the content attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87670826">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-87670826</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcontent' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='meta' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"meta"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;content interface='HTMLMetaElement' obj='testNode' var='vcontent'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcontent' expected='"text/html; CHARSET=utf-8"' <a id="contentLink">id='contentLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/meta.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement02.html
new file mode 100644
index 0000000000..dbea6bcf10
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMetaElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "meta");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The httpEquiv attribute specifies an HTTP respnse header name.
+
+ Retrieve the httpEquiv attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77289449
+*/
+function HTMLMetaElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLMetaElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vhttpequiv;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "meta");
+ nodeList = doc.getElementsByTagName("meta");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhttpequiv = testNode.httpEquiv;
+
+ assertEquals("httpEquivLink","Content-Type",vhttpequiv);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement02</h2>
+<p>&lt;test name='HTMLMetaElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMetaElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The httpEquiv attribute specifies an HTTP respnse header name.
+
+ Retrieve the httpEquiv attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77289449">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77289449</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhttpequiv' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='meta' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"meta"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;httpEquiv interface='HTMLMetaElement' obj='testNode' var='vhttpequiv'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhttpequiv' expected='"Content-Type"' <a id="httpEquivLink">id='httpEquivLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/meta.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement03.html
new file mode 100644
index 0000000000..12925a90ac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMetaElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "meta");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the meta information name.
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31037081
+*/
+function HTMLMetaElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLMetaElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "meta");
+ nodeList = doc.getElementsByTagName("meta");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","Meta-Name",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement03</h2>
+<p>&lt;test name='HTMLMetaElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMetaElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the meta information name.
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31037081">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31037081</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='meta' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"meta"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLMetaElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"Meta-Name"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/meta.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement04.html
new file mode 100644
index 0000000000..23f0f286e3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLMetaElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLMetaElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "meta");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The scheme attribute specifies a select form of content.
+
+ Retrieve the scheme attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35993789
+*/
+function HTMLMetaElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLMetaElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vscheme;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "meta");
+ nodeList = doc.getElementsByTagName("meta");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vscheme = testNode.scheme;
+
+ assertEquals("schemeLink","NIST",vscheme);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLMetaElement04</h2>
+<p>&lt;test name='HTMLMetaElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLMetaElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The scheme attribute specifies a select form of content.
+
+ Retrieve the scheme attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35993789">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35993789</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscheme' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='meta' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"meta"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scheme interface='HTMLMetaElement' obj='testNode' var='vscheme'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscheme' expected='"NIST"' <a id="schemeLink">id='schemeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/meta.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLModElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement01.html
new file mode 100644
index 0000000000..cbe1693e45
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLModElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "mod");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cite attribute specifies an URI designating a document that describes
+ the reason for the change.
+
+ Retrieve the cite attribute of the INS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708
+*/
+function HTMLModElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLModElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcite;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "mod");
+ nodeList = doc.getElementsByTagName("ins");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcite = testNode.cite;
+
+ assertURIEquals("citeLink",null,null,null,"ins-reasons.html",null,null,null,null,vcite);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement01</h2>
+<p>&lt;test name='HTMLModElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLModElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cite attribute specifies an URI designating a document that describes
+ the reason for the change.
+
+ Retrieve the cite attribute of the INS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcite' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='mod' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ins"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cite interface='HTMLModElement' obj='testNode' var='vcite'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vcite' file='"ins-reasons.html"' <a id="citeLink">id='citeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/mod.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLModElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement02.html
new file mode 100644
index 0000000000..5d4a7213f5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLModElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "mod");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dateTime attribute specifies the date and time of the change.
+
+ Retrieve the dateTime attribute of the INS element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678
+*/
+function HTMLModElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLModElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vdatetime;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "mod");
+ nodeList = doc.getElementsByTagName("ins");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdatetime = testNode.dateTime;
+
+ assertEquals("dateTimeLink","January 1, 2002",vdatetime);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement02</h2>
+<p>&lt;test name='HTMLModElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLModElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dateTime attribute specifies the date and time of the change.
+
+ Retrieve the dateTime attribute of the INS element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdatetime' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='mod' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ins"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dateTime interface='HTMLModElement' obj='testNode' var='vdatetime'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdatetime' expected='"January 1, 2002"' <a id="dateTimeLink">id='dateTimeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/mod.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLModElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement03.html
new file mode 100644
index 0000000000..35dcdd3376
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLModElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "mod");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cite attribute specifies an URI designating a document that describes
+ the reason for the change.
+
+ Retrieve the cite attribute of the DEL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708
+*/
+function HTMLModElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLModElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vcite;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "mod");
+ nodeList = doc.getElementsByTagName("del");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcite = testNode.cite;
+
+ assertURIEquals("citeLink",null,null,null,"del-reasons.html",null,null,null,null,vcite);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement03</h2>
+<p>&lt;test name='HTMLModElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLModElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cite attribute specifies an URI designating a document that describes
+ the reason for the change.
+
+ Retrieve the cite attribute of the DEL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75101708</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcite' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='mod' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"del"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cite interface='HTMLModElement' obj='testNode' var='vcite'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vcite' file='"del-reasons.html"' <a id="citeLink">id='citeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/mod.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLModElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement04.html
new file mode 100644
index 0000000000..c5eb3ac39e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLModElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLModElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "mod");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The dateTime attribute specifies the date and time of the change.
+
+ Retrieve the dateTime attribute of the DEL element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678
+*/
+function HTMLModElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLModElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vdatetime;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "mod");
+ nodeList = doc.getElementsByTagName("del");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdatetime = testNode.dateTime;
+
+ assertEquals("dateTimeLink","January 2, 2002",vdatetime);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLModElement04</h2>
+<p>&lt;test name='HTMLModElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLModElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The dateTime attribute specifies the date and time of the change.
+
+ Retrieve the dateTime attribute of the DEL element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88432678</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdatetime' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='mod' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"del"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dateTime interface='HTMLModElement' obj='testNode' var='vdatetime'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdatetime' expected='"January 2, 2002"' <a id="dateTimeLink">id='dateTimeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/mod.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement01.html
new file mode 100644
index 0000000000..f3cef3fec0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOListElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "olist");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76448506
+*/
+function HTMLOListElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLOListElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "olist");
+ nodeList = doc.getElementsByTagName("ol");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement01</h2>
+<p>&lt;test name='HTMLOListElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOListElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The compact attribute specifies a boolean value on whether to display
+ the list more compactly.
+
+ Retrieve the compact attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76448506">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76448506</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='olist' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ol"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLOListElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/olist.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement02.html
new file mode 100644
index 0000000000..6dee163987
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOListElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "olist");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The start attribute specifies the starting sequence number.
+
+ Retrieve the start attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14793325
+*/
+function HTMLOListElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLOListElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vstart;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "olist");
+ nodeList = doc.getElementsByTagName("ol");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vstart = testNode.start;
+
+ assertEquals("startLink",1,vstart);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement02</h2>
+<p>&lt;test name='HTMLOListElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOListElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The start attribute specifies the starting sequence number.
+
+ Retrieve the start attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14793325">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14793325</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vstart' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='olist' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ol"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;start interface='HTMLOListElement' obj='testNode' var='vstart'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vstart' expected='1' <a id="startLink">id='startLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/olist.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement03.html
new file mode 100644
index 0000000000..4fb9f4fda5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOListElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOListElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "olist");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the numbering style.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40971103
+*/
+function HTMLOListElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLOListElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "olist");
+ nodeList = doc.getElementsByTagName("ol");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","1",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOListElement03</h2>
+<p>&lt;test name='HTMLOListElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOListElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the numbering style.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40971103">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40971103</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='olist' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ol"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLOListElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"1"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/olist.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement01.html
new file mode 100644
index 0000000000..4c4f3eee04
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement01.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
+*/
+function HTMLObjectElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var fNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object2");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("idLink","object2",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement01</h2>
+<p>&lt;test name='HTMLObjectElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-19&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLObjectElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"object2"' <a id="idLink">id='idLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement02.html
new file mode 100644
index 0000000000..371b72bc78
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The code attribute specifies an Applet class file.
+
+Retrieve the code attribute of the second OBJECT element and examine
+its value. Should be "" since CODE is not a valid attribute for OBJECT.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75241146
+*/
+function HTMLObjectElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vcode = testNode.code;
+
+ assertEquals("codeLink","",vcode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement02</h2>
+<p>&lt;test name='HTMLObjectElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The code attribute specifies an Applet class file.
+
+Retrieve the code attribute of the second OBJECT element and examine
+its value. Should be "" since CODE is not a valid attribute for OBJECT.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75241146">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75241146</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcode' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;code interface='HTMLObjectElement' obj='testNode' var='vcode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcode' expected='""' <a id="codeLink">id='codeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement03.html
new file mode 100644
index 0000000000..57f9cb397f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the alignment of this object with respect
+ to its surrounding text.
+
+ Retrieve the align attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097
+*/
+function HTMLObjectElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","middle",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement03</h2>
+<p>&lt;test name='HTMLObjectElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the alignment of this object with respect
+ to its surrounding text.
+
+ Retrieve the align attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLObjectElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"middle"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement04.html
new file mode 100644
index 0000000000..e453aa6d6d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The archive attribute specifies a space-separated list of archives.
+
+ Retrieve the archive attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837
+*/
+function HTMLObjectElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var varchive;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ varchive = testNode.archive;
+
+ assertEquals("archiveLink","",varchive);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement04</h2>
+<p>&lt;test name='HTMLObjectElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The archive attribute specifies a space-separated list of archives.
+
+ Retrieve the archive attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='varchive' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;archive interface='HTMLObjectElement' obj='testNode' var='varchive'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='varchive' expected='""' <a id="archiveLink">id='archiveLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement05.html
new file mode 100644
index 0000000000..1201d96652
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The border attribute specifies the width of the border around the object.
+
+ Retrieve the border attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419
+*/
+function HTMLObjectElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vborder = testNode.border;
+
+ assertEquals("borderLink","0",vborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement05</h2>
+<p>&lt;test name='HTMLObjectElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The border attribute specifies the widht of the border around the object.
+
+ Retrieve the border attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;border interface='HTMLObjectElement' obj='testNode' var='vborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vborder' expected='"0"' <a id="borderLink">id='borderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement06.html
new file mode 100644
index 0000000000..eccc553d57
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The codeBase attribute specifies the base URI for the classid, data and
+ archive attributes.
+
+ Retrieve the codeBase attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136
+*/
+function HTMLObjectElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vcodebase;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vcodebase = testNode.codeBase;
+
+ assertURIEquals("codebaseLink",null,"//example.org/",null,null,null,null,null,null,vcodebase);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement06</h2>
+<p>&lt;test name='HTMLObjectElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The codeBase attribute specifies the base URI for the classid, data and
+ archive attributes.
+
+ Retrieve the codeBase attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcodebase' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;codeBase interface='HTMLObjectElement' obj='testNode' var='vcodebase'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vcodebase' path='"//xw2k.sdct.itl.nist.gov/brady/dom/"' <a id="codebaseLink">id='codebaseLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement07.html
new file mode 100644
index 0000000000..80f88e5125
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The codeType attribute specifies the data downloaded via the classid
+ attribute.
+
+ Retrieve the codeType attribute of the second OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008
+*/
+function HTMLObjectElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vcodetype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vcodetype = testNode.codeType;
+
+ assertEquals("codetypeLink","image/gif",vcodetype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement07</h2>
+<p>&lt;test name='HTMLObjectElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The codeType attribute specifies the data downloaded via the classid
+ attribute.
+
+ Retrieve the codeType attribute of the second OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcodetype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;codeType interface='HTMLObjectElement' obj='testNode' var='vcodetype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcodetype' expected='"image/gif"' <a id="codetypeLink">id='codetypeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement08.html
new file mode 100644
index 0000000000..c02fdbe664
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The data attribute specifies the URI of the location of the objects data.
+
+ Retrieve the data attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986
+*/
+function HTMLObjectElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vdata;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vdata = testNode.data;
+
+ assertURIEquals("dataLink",null,null,null,"logo.gif",null,null,null,null,vdata);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement08</h2>
+<p>&lt;test name='HTMLObjectElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The data attribute specifies the URI of the location of the objects data.
+
+ Retrieve the data attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdata' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;data interface='HTMLObjectElement' obj='testNode' var='vdata'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vdata' file='"logo.gif"' <a id="dataLink">id='dataLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement09.html
new file mode 100644
index 0000000000..f73724ed54
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement09.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The declare attribute specifies this object should be declared only and
+ no instance of it should be created.
+
+ Retrieve the declare attribute of the second OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-942770
+*/
+function HTMLObjectElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vdeclare;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vdeclare = testNode.declare;
+
+ assertTrue("declareLink",vdeclare);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement09</h2>
+<p>&lt;test name='HTMLObjectElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The declare attribute specifies this object should be declared only and
+ no instance of it should be created.
+
+ Retrieve the declare attribute of the second OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-942770">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-942770</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdeclare' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;declare interface='HTMLObjectElement' obj='testNode' var='vdeclare'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdeclare' <a id="declareLink">id='declareLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement10.html
new file mode 100644
index 0000000000..1d29317784
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The height attribute overrides the value of the actual height of the
+ object.
+
+ Retrieve the height attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838
+*/
+function HTMLObjectElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","60",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement10</h2>
+<p>&lt;test name='HTMLObjectElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The height attribute overrides the value of the actual height of the
+ object.
+
+ Retrieve the height attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLObjectElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"60"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement11.html
new file mode 100644
index 0000000000..13f6d5903a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The hspace attribute specifies the horizontal space to the left and right
+ of this image, applet or object.
+
+ Retrieve the hspace attribute of the first OBJECT element and examine
+ it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376
+*/
+function HTMLObjectElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vhspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vhspace = testNode.hspace;
+
+ assertEquals("hspaceLink",0,vhspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement11</h2>
+<p>&lt;test name='HTMLObjectElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The hspace attribute specifies the horizontal space to the left and right
+ of this image, applet or object.
+
+ Retrieve the hspace attribute of the first OBJECT element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hspace interface='HTMLObjectElement' obj='testNode' var='vhspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhspace' expected='0' <a id="hspaceLink">id='hspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement12.html
new file mode 100644
index 0000000000..536cf8e0c0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement12.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The standby attribute specifies a message to render while loading the
+ object.
+
+ Retrieve the standby attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673
+*/
+function HTMLObjectElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vstandby;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vstandby = testNode.standby;
+
+ assertEquals("alignLink","Loading Image ...",vstandby);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement12</h2>
+<p>&lt;test name='HTMLObjectElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The standby attribute specifies a message to render while loading the
+ object.
+
+ Retrieve the standby attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vstandby' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;standby interface='HTMLObjectElement' obj='testNode' var='vstandby'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vstandby' expected='"Loading Image ..."' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement13.html
new file mode 100644
index 0000000000..c0ef4ff6cd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement13.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute specifies the elements position in the tabbing
+ order.
+
+ Retrieve the tabIndex attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787
+*/
+function HTMLObjectElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",0,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement13</h2>
+<p>&lt;test name='HTMLObjectElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute specifies the elements position in the tabbing
+ order.
+
+ Retrieve the tabIndex attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLObjectElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='0' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement14.html
new file mode 100644
index 0000000000..e29e05f06e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement14.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the content type for data downloaded via
+ the data attribute.
+
+ Retrieve the type attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621
+*/
+function HTMLObjectElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","image/gif",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement14</h2>
+<p>&lt;test name='HTMLObjectElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the content type for data downloaded via
+ the data attribute.
+
+ Retrieve the type attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLObjectElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"image/gif"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement15.html
new file mode 100644
index 0000000000..ce452d6b01
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement15.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The useMap attribute specifies the used client-side image map.
+
+ Retrieve the useMap attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772
+*/
+function HTMLObjectElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var vusemap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vusemap = testNode.useMap;
+
+ assertEquals("useMapLink","#DivLogo-map",vusemap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement15</h2>
+<p>&lt;test name='HTMLObjectElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The useMap attribute specifies the used client-side image map.
+
+ Retrieve the useMap attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vusemap' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;useMap interface='HTMLObjectElement' obj='testNode' var='vusemap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vusemap' expected='"#DivLogo-map"' <a id="useMapLink">id='useMapLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement16.html
new file mode 100644
index 0000000000..2f2739b6e9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement16.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vspace attribute specifies the vertical space above or below this
+ image, applet or object.
+
+ Retrieve the vspace attribute of the first OBJECT element and examine
+ it's value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483
+*/
+function HTMLObjectElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var vvspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vvspace = testNode.vspace;
+
+ assertEquals("vspaceLink",0,vvspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement16</h2>
+<p>&lt;test name='HTMLObjectElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vspace attribute specifies the vertical space above or below this
+ image, applet or object.
+
+ Retrieve the vspace attribute of the first OBJECT element and examine
+ it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-01-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vspace interface='HTMLObjectElement' obj='testNode' var='vvspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvspace' expected='0' <a id="vspaceLink">id='vspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement17.html
new file mode 100644
index 0000000000..f0a8ff1707
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement17.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute overrides the original width value.
+
+ Retrieve the width attribute of the first OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620
+*/
+function HTMLObjectElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","550",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement17</h2>
+<p>&lt;test name='HTMLObjectElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute overrides the original width value.
+
+ Retrieve the width attribute of the first OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLObjectElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"550"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement18.html
new file mode 100644
index 0000000000..eaac546f83
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement18.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies form control or object name when submitted
+ with a form.
+
+ Retrieve the name attribute of the second OBJECT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20110362
+*/
+function HTMLObjectElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vname = testNode.name;
+
+ assertEquals("vspaceLink","OBJECT2",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement18</h2>
+<p>&lt;test name='HTMLObjectElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies form control or object name when submitted
+ with a form.
+
+ Retrieve the name attribute of the second OBJECT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20110362">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20110362</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLObjectElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"OBJECT2"' <a id="vspaceLink">id='vspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement19.html
new file mode 100644
index 0000000000..1ca95e5223
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement19.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
+*/
+function HTMLObjectElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object2");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement19</h2>
+<p>&lt;test name='HTMLObjectElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ form.
+
+ Retrieve the form attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-19&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLObjectElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement20.html
new file mode 100644
index 0000000000..aca8fe3cc5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLObjectElement20.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLObjectElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object2");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The contentDocument attribute specifies the document this object contains,
+ if there is any and it is available, or null otherwise.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-38538621
+*/
+function HTMLObjectElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLObjectElement20") != null) return;
+ var testNode;
+ var cd;
+ var vtitle;
+ var doc;
+ var nodeList;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object2");
+ nodeList = doc.getElementsByTagName("object");
+ testNode = nodeList.item(1);
+ cd = testNode.contentDocument;
+
+ assertNull("noContentDocument",cd);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLObjectElement20</h2>
+<p>&lt;test name='HTMLObjectElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLObjectElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The contentDocument attribute specifies the document this object contains,
+ if there is any and it is available, or null otherwise.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-07-03&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-38538621">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-38538621</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cd' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object2' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName var='nodeList' obj='doc' interface='Document' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item var='testNode' obj='nodeList' index='1' interface='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contentDocument interface='HTMLObjectElement' obj='testNode' var='cd'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='cd' <a id="noContentDocument">id='noContentDocument'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object2.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement01.html
new file mode 100644
index 0000000000..a009cf9044
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptGroupElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptGroupElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optgroup");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute indicates that the control is unavailable in
+ this context.
+
+ Retrieve the disabled attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15518803
+*/
+function HTMLOptGroupElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptGroupElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optgroup");
+ nodeList = doc.getElementsByTagName("optgroup");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptGroupElement01</h2>
+<p>&lt;test name='HTMLOptGroupElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptGroupElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute indicates that the control is unavailable in
+ this context.
+
+ Retrieve the disabled attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15518803">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-15518803</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optgroup' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"optgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLOptGroupElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optgroup.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement02.html
new file mode 100644
index 0000000000..f1dc5e2c33
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptGroupElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptGroupElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptGroupElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optgroup");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The label attribute specifies the label assigned to this option group.
+
+ Retrieve the label attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95806054
+*/
+function HTMLOptGroupElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptGroupElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vlabel;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optgroup");
+ nodeList = doc.getElementsByTagName("optgroup");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vlabel = testNode.label;
+
+ assertEquals("labelLink","Regular Employees",vlabel);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptGroupElement02</h2>
+<p>&lt;test name='HTMLOptGroupElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptGroupElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The label attribute specifies the label assigned to this option group.
+
+ Retrieve the label attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95806054">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-95806054</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlabel' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optgroup' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"optgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label interface='HTMLOptGroupElement' obj='testNode' var='vlabel'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlabel' expected='"Regular Employees"' <a id="labelLink">id='labelLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optgroup.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement01.html
new file mode 100644
index 0000000000..a5bfd416f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement01.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first SELECT element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503
+*/
+function HTMLOptionElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement01</h2>
+<p>&lt;test name='HTMLOptionElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first SELECT element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLOptionElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement02.html
new file mode 100644
index 0000000000..d5b9c605ed
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the first OPTION attribute from the second select element and
+ examine its form element.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503
+*/
+function HTMLOptionElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(6);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement02</h2>
+<p>&lt;test name='HTMLOptionElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the first OPTION attribute from the second select element and
+ examine its form element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-17116503</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLOptionElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement03.html
new file mode 100644
index 0000000000..45e90fe106
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The defaultSelected attribute contains the value of the selected
+ attribute.
+
+ Retrieve the defaultSelected attribute from the first OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37770574
+*/
+function HTMLOptionElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vdefaultselected;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(0);
+ vdefaultselected = testNode.defaultSelected;
+
+ assertTrue("defaultSelectedLink",vdefaultselected);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement03</h2>
+<p>&lt;test name='HTMLOptionElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The defaultSelected attribute contains the value of the selected
+ attribute.
+
+ Retrieve the defaultSelected attribute from the first OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37770574">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-37770574</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdefaultselected' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defaultSelected interface='HTMLOptionElement' obj='testNode' var='vdefaultselected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdefaultselected' <a id="defaultSelectedLink">id='defaultSelectedLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement04.html
new file mode 100644
index 0000000000..e85f2aced9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The text attribute contains the text contained within the option element.
+
+ Retrieve the text attribute from the second OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48154426
+*/
+function HTMLOptionElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vtext;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(1);
+ vtext = testNode.text;
+
+ assertEquals("textLink","EMP10002",vtext);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement04</h2>
+<p>&lt;test name='HTMLOptionElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The text attribute contains the text contained within the option element.
+
+ Retrieve the text attribute from the second OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48154426">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48154426</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtext' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;text interface='HTMLOptionElement' obj='testNode' var='vtext'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtext' expected='"EMP10002"' <a id="textLink">id='textLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement05.html
new file mode 100644
index 0000000000..4ddfab2f72
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement05.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The index attribute indicates th index of this OPTION in ints parent
+ SELECT.
+
+ Retrieve the index attribute from the seventh OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14038413
+*/
+function HTMLOptionElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(6);
+ vindex = testNode.index;
+
+ assertEquals("indexLink",1,vindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement05</h2>
+<p>&lt;test name='HTMLOptionElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The index attribute indicates th index of this OPTION in ints parent
+ SELECT.
+
+ Retrieve the index attribute from the seventh OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14038413">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14038413</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;index interface='HTMLOptionElement' obj='testNode' var='vindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vindex' expected='1' <a id="indexLink">id='indexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement06.html
new file mode 100644
index 0000000000..2e27c7dc71
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute indicates that this control is not available
+ within this context.
+
+ Retrieve the disabled attribute from the last OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23482473
+*/
+function HTMLOptionElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(9);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement06</h2>
+<p>&lt;test name='HTMLOptionElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute indicates that this control is not available
+ within this context.
+
+ Retrieve the disabled attribute from the last OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23482473">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23482473</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='9'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLOptionElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement07.html
new file mode 100644
index 0000000000..0d85407a62
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The label attribute is used in hierarchical menus. It specifies
+ a shorter label for an option that the content of the OPTION element.
+
+ Retrieve the label attribute from the second OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40736115
+*/
+function HTMLOptionElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vlabel;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(1);
+ vlabel = testNode.label;
+
+ assertEquals("labelLink","l1",vlabel);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement07</h2>
+<p>&lt;test name='HTMLOptionElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The label attribute is used in hierarchical menus. It specifies
+ a shorter label for an option that the content of the OPTION element.
+
+ Retrieve the label attribute from the second OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40736115">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40736115</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlabel' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label interface='HTMLOptionElement' obj='testNode' var='vlabel'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlabel' expected='"l1"' <a id="labelLink">id='labelLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement08.html
new file mode 100644
index 0000000000..8d82008f85
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement08.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The selected attribute indicates the current state of the corresponding
+ form control in an interactive user-agent.
+
+ Retrieve the selected attribute from the first OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70874476
+*/
+function HTMLOptionElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vselected;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(0);
+ vselected = testNode.defaultSelected;
+
+ assertTrue("selectedLink",vselected);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement08</h2>
+<p>&lt;test name='HTMLOptionElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The selected attribute indicates the current state of the corresponding
+ form control in an interactive user-agent.
+
+ Retrieve the selected attribute from the first OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70874476">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70874476</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vselected' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defaultSelected interface='HTMLOptionElement' obj='testNode' var='vselected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vselected' <a id="selectedLink">id='selectedLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement09.html
new file mode 100644
index 0000000000..692da1686f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "option");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute contains the current form control value.
+
+ Retrieve the value attribute from the first OPTION element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6185554
+*/
+function HTMLOptionElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "option");
+ nodeList = doc.getElementsByTagName("option");
+ assertSize("Asize",10,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink","10001",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionElement09</h2>
+<p>&lt;test name='HTMLOptionElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute contains the current form control value.
+
+ Retrieve the value attribute from the first OPTION element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6185554">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6185554</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='option' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='10' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLOptionElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"10001"' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/option.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection01.html
new file mode 100644
index 0000000000..01fd99e8ae
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection01.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ The length attribute specifies the length or size of the list.
+
+ Retrieve the first SELECT element and create a HTMLOptionsCollection
+ of the OPTION elements. Check the size of the length of OPTION elements.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-length
+*/
+function HTMLOptionsCollection01() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection01") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsList;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ optionsList = testNode.options;
+
+ vlength = optionsList.length;
+
+ assertEquals("lengthLink",5,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection01</h2>
+<p>&lt;test name='HTMLOptionsCollection01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ The length attribute specifies the length or size of the list.
+
+ Retrieve the first SELECT element and create a HTMLOptionsCollection
+ of the OPTION elements. Check the size of the length of OPTION elements.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-length">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-length</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsList' type='HTMLOptionsCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options interface='HTMLSelectElement' obj='testNode' var='optionsList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLOptionsCollection' obj='optionsList' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='5' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection02.html
new file mode 100644
index 0000000000..c08d936743
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection02.html
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index=3).
+ The item() method retrieves a node specified by ordinal index.
+ Nodes are numbered in tree order. The index origin is 0.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the fourth item in the list and examine its firstChild's
+ nodeValue.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
+*/
+function HTMLOptionsCollection02() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection02") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var optionsValueNode;
+ var optionsList;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ optionsList = testNode.options;
+
+ optionsNode = optionsList.item(3);
+ optionsValueNode = optionsNode.firstChild;
+
+ vvalue = optionsValueNode.nodeValue;
+
+ assertEquals("valueIndexLink","EMP10004",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection02</h2>
+<p>&lt;test name='HTMLOptionsCollection02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index=3).
+ The item() method retrieves a node specified by ordinal index.
+ Nodes are numbered in tree order. The index origin is 0.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the fourth item in the list and examine its firstChild's
+ nodeValue.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsValueNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsList' type='HTMLOptionsCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options interface='HTMLSelectElement' obj='testNode' var='optionsList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLOptionsCollection' obj='optionsList' var='optionsNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='optionsNode' var='optionsValueNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='optionsValueNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"EMP10004"' <a id="valueIndexLink">id='valueIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection03.html
new file mode 100644
index 0000000000..5796b4878f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection03.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has select1 as the value for the name attribute.
+ Get the nodeName of that element.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
+*/
+function HTMLOptionsCollection03() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection03") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ optionsNode = formsnodeList.namedItem("select1");
+ vname = optionsNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","select",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection03</h2>
+<p>&lt;test name='HTMLOptionsCollection03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has select1 as the value for the name attribute.
+ Get the nodeName of that element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem interface='HTMLOptionsCollection' obj='formsnodeList' var='optionsNode' name='"select1"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='optionsNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"select"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection04.html
new file mode 100644
index 0000000000..a759055091
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection04.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has selectId as the value for the id attribute.
+ Get the nodeName of that element.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
+*/
+function HTMLOptionsCollection04() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection04") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ optionsNode = formsnodeList.namedItem("selectId");
+ vname = optionsNode.nodeName;
+
+ assertEqualsAutoCase("element", "nameIndexLink","select",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection04</h2>
+<p>&lt;test name='HTMLOptionsCollection04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has selectId as the value for the id attribute.
+ Get the nodeName of that element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem interface='HTMLOptionsCollection' obj='formsnodeList' var='optionsNode' name='"selectId"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='optionsNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"select"' <a id="nameIndexLink">id='nameIndexLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection05.html
new file mode 100644
index 0000000000..46922420f9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection05.html
@@ -0,0 +1,160 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute. Upon failure(e.q., no
+ node with this name exists), returns null.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has select9 as the value for the name attribute.
+ Null should be returned since there is not any name or id attribute with
+ select9 as a value.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem
+*/
+function HTMLOptionsCollection05() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection05") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var formsnodeList;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("form");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ formsnodeList = testNode.elements;
+
+ optionsNode = formsnodeList.namedItem("select9");
+ assertNull("nameIndexLink",optionsNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection05</h2>
+<p>&lt;test name='HTMLOptionsCollection05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test node name).
+ The namedItem method retrieves a Node using a name. It first searches
+ for a node with a matching id attribute. If it doesn't find one, it
+ then searches for a Node with a matching name attribute, but only
+ those elements that are allowed a name attribute. Upon failure(e.q., no
+ node with this name exists), returns null.
+
+ Retrieve the first FORM element. Create a HTMLCollection of the elements.
+ Search for an element that has select9 as the value for the name attribute.
+ Null should be returned since there is not any name or id attribute with
+ select9 as a value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-namedItem</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"form"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;elements interface='HTMLFormElement' obj='testNode' var='formsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;namedItem interface='HTMLOptionsCollection' obj='formsnodeList' var='optionsNode' name='"select9"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='optionsNode' <a id="nameIndexLink">id='nameIndexLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection06.html
new file mode 100644
index 0000000000..d3638d4d00
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection06.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index).
+ The item() method retrieves a node specified by ordinal index.
+ A value of null is returned if the index is out of range.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the tenth item in the list - null should be returned since
+ there are not 10 items in the list.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
+*/
+function HTMLOptionsCollection06() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection06") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var optionsValueNode;
+ var optionsList;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ optionsList = testNode.options;
+
+ optionsNode = optionsList.item(10);
+ assertNull("optionsIndexLink",optionsNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection06</h2>
+<p>&lt;test name='HTMLOptionsCollection06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index).
+ The item() method retrieves a node specified by ordinal index.
+ A value of null is returned if the index is out of range.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the tenth item in the list - null should be returned since
+ there are not 10 items in the list.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsValueNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsList' type='HTMLOptionsCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options interface='HTMLSelectElement' obj='testNode' var='optionsList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLOptionsCollection' obj='optionsList' var='optionsNode' index='10'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='optionsNode' <a id="optionsIndexLink">id='optionsIndexLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection07.html
new file mode 100644
index 0000000000..b41c12c6b9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLOptionsCollection07.html
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLOptionsCollection07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "optionscollection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index=0).
+ The item() method retrieves a node specified by ordinal index. Nodes
+ are numbered in tree order. The index origin is 0.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the first item in the list and examine its firstChild's
+ nodeValue.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item
+*/
+function HTMLOptionsCollection07() {
+ var success;
+ if(checkInitialization(builder, "HTMLOptionsCollection07") != null) return;
+ var nodeList;
+ var testNode;
+ var optionsNode;
+ var optionsValueNode;
+ var optionsList;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "optionscollection");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ optionsList = testNode.options;
+
+ optionsNode = optionsList.item(0);
+ optionsValueNode = optionsNode.firstChild;
+
+ vvalue = optionsValueNode.nodeValue;
+
+ assertEquals("valueIndexLink","EMP10001",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLOptionsCollection07</h2>
+<p>&lt;test name='HTMLOptionsCollection07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLOptionsCollection07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ An HTMLOptionsCollection is a list of nodes representing HTML option
+ element.
+ An individual node may be accessed by either ordinal index, the node's
+ name or id attributes. (Test ordinal index=0).
+ The item() method retrieves a node specified by ordinal index. Nodes
+ are numbered in tree order. The index origin is 0.
+
+ Retrieve the first SELECT element. Create a HTMLOptionsCollection.
+ Retrieve the first item in the list and examine its firstChild's
+ nodeValue.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-08-01&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTMLOptionsCollection-item</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsValueNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsList' type='HTMLOptionsCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='optionscollection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options interface='HTMLSelectElement' obj='testNode' var='optionsList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLOptionsCollection' obj='optionsList' var='optionsNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='optionsNode' var='optionsValueNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='optionsValueNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"EMP10001"' <a id="valueIndexLink">id='valueIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/optionscollection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLParagraphElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLParagraphElement01.html
new file mode 100644
index 0000000000..3c47050e96
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLParagraphElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParagraphElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLParagraphElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "paragraph");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal text alignment.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53465507
+*/
+function HTMLParagraphElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLParagraphElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "paragraph");
+ nodeList = doc.getElementsByTagName("p");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParagraphElement01</h2>
+<p>&lt;test name='HTMLParagraphElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLParagraphElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal text alignment.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53465507">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53465507</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='paragraph' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"p"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLParagraphElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/paragraph.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement01.html
new file mode 100644
index 0000000000..ba01514f72
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLParamElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "param");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the name of the run-time parameter.
+
+ Retrieve the name attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59871447
+*/
+function HTMLParamElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLParamElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "param");
+ nodeList = doc.getElementsByTagName("param");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","image3",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement01</h2>
+<p>&lt;test name='HTMLParamElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLParamElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the name of the run-time parameter.
+
+ Retrieve the name attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59871447">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59871447</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='param' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"param"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLParamElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"image3"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/param.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement02.html
new file mode 100644
index 0000000000..c79cac1946
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLParamElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "param");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute specifies the value of the run-time parameter.
+
+ Retrieve the value attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77971357
+*/
+function HTMLParamElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLParamElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "param");
+ nodeList = doc.getElementsByTagName("param");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertURIEquals("valueLink",null,null,null,"file.gif",null,null,null,null,vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement02</h2>
+<p>&lt;test name='HTMLParamElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLParamElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute specifies the value of the run-time parameter.
+
+ Retrieve the value attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77971357">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77971357</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='param' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"param"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLParamElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vvalue' file='"file.gif"' <a id="valueLink">id='valueLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/param.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement03.html
new file mode 100644
index 0000000000..5a65288e1f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLParamElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "param");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The valueType attribute specifies information about the meaning of the
+ value specified by the value attribute.
+
+ Retrieve the valueType attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23931872
+*/
+function HTMLParamElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLParamElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vvaluetype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "param");
+ nodeList = doc.getElementsByTagName("param");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvaluetype = testNode.valueType;
+
+ assertEquals("valueTypeLink","ref",vvaluetype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement03</h2>
+<p>&lt;test name='HTMLParamElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLParamElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The valueType attribute specifies information about the meaning of the
+ value specified by the value attribute.
+
+ Retrieve the valueType attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23931872">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23931872</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvaluetype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='param' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"param"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;valueType interface='HTMLParamElement' obj='testNode' var='vvaluetype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvaluetype' expected='"ref"' <a id="valueTypeLink">id='valueTypeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/param.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement04.html
new file mode 100644
index 0000000000..a22a8f6982
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLParamElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLParamElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "param");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the content type for the value attribute
+ when valuetype has the value ref.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18179888
+*/
+function HTMLParamElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLParamElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "param");
+ nodeList = doc.getElementsByTagName("param");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","image/gif",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLParamElement04</h2>
+<p>&lt;test name='HTMLParamElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLParamElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the content type for the value attribute
+ when valuetype has the value ref.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18179888">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18179888</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='param' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"param"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLParamElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"image/gif"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/param.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLPreElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLPreElement01.html
new file mode 100644
index 0000000000..806a0b4544
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLPreElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLPreElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLPreElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "pre");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the fixed width for content.
+
+ Retrieve the width attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13894083
+*/
+function HTMLPreElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLPreElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "pre");
+ nodeList = doc.getElementsByTagName("pre");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink",277,vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLPreElement01</h2>
+<p>&lt;test name='HTMLPreElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLPreElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the fixed width for content.
+
+ Retrieve the width attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13894083">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13894083</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='pre' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"pre"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLPreElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='277' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/pre.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement01.html
new file mode 100644
index 0000000000..7a18ed3b89
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLQuoteElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLQuoteElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "quote");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cite attribute specifies a URI designating a source document
+ or message.
+
+ Retrieve the cite attribute from the Q element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598
+*/
+function HTMLQuoteElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLQuoteElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcite;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "quote");
+ nodeList = doc.getElementsByTagName("q");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcite = testNode.cite;
+
+ assertURIEquals("citeLink",null,null,null,"Q.html",null,null,null,null,vcite);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLQuoteElement01</h2>
+<p>&lt;test name='HTMLQuoteElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLQuoteElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cite attribute specifies a URI designating a source document
+ or message.
+
+ Retrieve the cite attribute from the Q element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcite' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='quote' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"q"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cite interface='HTMLQuoteElement' obj='testNode' var='vcite'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vcite' file='"Q.html"' <a id="citeLink">id='citeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/quote.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement02.html
new file mode 100644
index 0000000000..d26872b8f8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLQuoteElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLQuoteElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLQuoteElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "quote");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cite attribute specifies a URI designating a source document
+ or message.
+
+ Retrieve the cite attribute from the BLOCKQUOTE element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598
+*/
+function HTMLQuoteElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLQuoteElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcite;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "quote");
+ nodeList = doc.getElementsByTagName("blockquote");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcite = testNode.cite;
+
+ assertURIEquals("citeLink",null,null,null,"BLOCKQUOTE.html",null,null,null,null,vcite);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLQuoteElement02</h2>
+<p>&lt;test name='HTMLQuoteElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLQuoteElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cite attribute specifies a URI designating a source document
+ or message.
+
+ Retrieve the cite attribute from the BLOCKQUOTE element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53895598</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcite' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='quote' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"blockquote"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cite interface='HTMLQuoteElement' obj='testNode' var='vcite'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vcite' file='"BLOCKQUOTE.html"' <a id="citeLink">id='citeLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/quote.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement01.html
new file mode 100644
index 0000000000..43e488f372
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The text attribute specifies the script content of the element.
+
+ Retrieve the text attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46872999
+*/
+function HTMLScriptElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vtext;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtext = testNode.text;
+
+ assertEquals("textLink","var a=2;",vtext);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement01</h2>
+<p>&lt;test name='HTMLScriptElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The text attribute specifies the script content of the element.
+
+ Retrieve the text attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46872999">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46872999</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtext' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;text interface='HTMLScriptElement' obj='testNode' var='vtext'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtext' expected='"var a=2;"' <a id="textLink">id='textLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement02.html
new file mode 100644
index 0000000000..45613a60f0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charset attribute specifies the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35305677
+*/
+function HTMLScriptElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharset;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcharset = testNode.charset;
+
+ assertEquals("charsetLink","US-ASCII",vcharset);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement02</h2>
+<p>&lt;test name='HTMLScriptElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charset attribute specifies the character encoding of the linked
+ resource.
+
+ Retrieve the charset attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35305677">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-35305677</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharset' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;charset interface='HTMLScriptElement' obj='testNode' var='vcharset'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharset' expected='"US-ASCII"' <a id="charsetLink">id='charsetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement03.html
new file mode 100644
index 0000000000..db02ff8e4e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The defer attribute specifies the user agent can defer processing of
+ the script.
+
+ Retrieve the defer attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93788534
+*/
+function HTMLScriptElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vdefer;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdefer = testNode.defer;
+
+ assertTrue("deferLink",vdefer);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement03</h2>
+<p>&lt;test name='HTMLScriptElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The defer attribute specifies the user agent can defer processing of
+ the script.
+
+ Retrieve the defer attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93788534">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93788534</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdefer' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defer interface='HTMLScriptElement' obj='testNode' var='vdefer'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdefer' <a id="deferLink">id='deferLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement04.html
new file mode 100644
index 0000000000..5d509e4982
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement04.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The src attribute specifies a URI designating an external script.
+
+ Retrieve the src attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75147231
+*/
+function HTMLScriptElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vsrc;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vsrc = testNode.src;
+
+ assertURIEquals("srcLink",null,null,null,"script1.js",null,null,null,null,vsrc);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement04</h2>
+<p>&lt;test name='HTMLScriptElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The src attribute specifies a URI designating an external script.
+
+ Retrieve the src attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75147231">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-75147231</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsrc' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;src interface='HTMLScriptElement' obj='testNode' var='vsrc'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vsrc' file='"script1.js"' <a id="srcLink">id='srcLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement05.html
new file mode 100644
index 0000000000..a36529b3e1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement05.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the content of the script language.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30534818
+*/
+function HTMLScriptElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","text/javaScript",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement05</h2>
+<p>&lt;test name='HTMLScriptElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the content of the script language.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30534818">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30534818</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLScriptElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"text/javaScript"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement06.html
new file mode 100644
index 0000000000..9609977cbc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement06.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+htmlFor is described as for future use. Test accesses the value, but makes no assertions about its value.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66979266
+*/
+function HTMLScriptElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var htmlFor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ htmlFor = testNode.htmlFor;
+
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement06</h2>
+<p>&lt;test name='HTMLScriptElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+htmlFor is described as for future use. Test accesses the value, but makes no assertions about its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66979266">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66979266</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='htmlFor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;htmlFor interface='HTMLScriptElement' obj='testNode' var='htmlFor'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement07.html
new file mode 100644
index 0000000000..6fad56b2f0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLScriptElement07.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLScriptElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "script");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+event is described as for future use. Test accesses the value, but makes no assertions about its value.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56700403
+*/
+function HTMLScriptElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLScriptElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var event;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "script");
+ nodeList = doc.getElementsByTagName("script");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ event = testNode.event;
+
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLScriptElement07</h2>
+<p>&lt;test name='HTMLScriptElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLScriptElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+event is described as for future use. Test accesses the value, but makes no assertions about its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56700403">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-56700403</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='event' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='script' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"script"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;event interface='HTMLScriptElement' obj='testNode' var='event'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/script.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement01.html
new file mode 100644
index 0000000000..3c2d78628e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute is the string "select-multiple" when multiple
+ attribute is true.
+
+ Retrieve the type attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58783172
+*/
+function HTMLSelectElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","select-multiple",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement01</h2>
+<p>&lt;test name='HTMLSelectElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute is the string "select-multiple" when multiple
+ attribute is true.
+
+ Retrieve the type attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58783172">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58783172</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLSelectElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"select-multiple"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement02.html
new file mode 100644
index 0000000000..ca1d52fc03
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The selectedIndex attribute specifies the ordinal index of the selected
+ option.
+
+ Retrieve the selectedIndex attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760
+*/
+function HTMLSelectElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vselectedindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vselectedindex = testNode.selectedIndex;
+
+ assertEquals("selectedIndexLink",0,vselectedindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement02</h2>
+<p>&lt;test name='HTMLSelectElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The selectedIndex attribute specifies the ordinal index of the selected
+ option.
+
+ Retrieve the selectedIndex attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vselectedindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='vselectedindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vselectedindex' expected='0' <a id="selectedIndexLink">id='selectedIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement03.html
new file mode 100644
index 0000000000..3fed838e63
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement03.html
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The selectedIndex attribute specifies the ordinal index of the selected
+ option. If no element is selected -1 is returned.
+
+ Retrieve the selectedIndex attribute from the second SELECT element and
+ examine its value.
+
+ Per http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1,
+ without an explicit selected attribute, user agent behavior is
+ undefined. There is no way to coerce no option to be selected.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760
+*/
+function HTMLSelectElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vselectedindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vselectedindex = testNode.selectedIndex;
+
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement03</h2>
+<p>&lt;test name='HTMLSelectElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The selectedIndex attribute specifies the ordinal index of the selected
+ option. If no element is selected -1 is returned.
+
+ Retrieve the selectedIndex attribute from the second SELECT element and
+ examine its value.
+
+ Per http://www.w3.org/TR/html401/interact/forms.html#h-17.6.1,
+ without an explicit selected attribute, user agent behavior is
+ undefined. There is no way to coerce no option to be selected.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-85676760</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vselectedindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='vselectedindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Commented assertion per section 17.6.3 --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- assertEquals actual="vselectedindex" expected="-1" id="selectedIndexLink" ignoreCase="false"/ --&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement04.html
new file mode 100644
index 0000000000..6300196dd9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute specifies the current form control value.
+
+ Retrieve the value attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59351919
+*/
+function HTMLSelectElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink","EMP1",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement04</h2>
+<p>&lt;test name='HTMLSelectElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute specifies the current form control value.
+
+ Retrieve the value attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59351919">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59351919</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLSelectElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"EMP1"' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement05.html
new file mode 100644
index 0000000000..a81c6bca81
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The length attribute specifies the number of options in this select.
+
+ Retrieve the length attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5933486
+*/
+function HTMLSelectElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vlength;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vlength = testNode.length;
+
+ assertEquals("lengthLink",5,vlength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement05</h2>
+<p>&lt;test name='HTMLSelectElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The length attribute specifies the number of options in this select.
+
+ Retrieve the length attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5933486">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5933486</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vlength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLSelectElement' obj='testNode' var='vlength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vlength' expected='5' <a id="lengthLink">id='lengthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement06.html
new file mode 100644
index 0000000000..bf90e3aa10
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement06.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first SELECT element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458
+*/
+function HTMLSelectElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement06</h2>
+<p>&lt;test name='HTMLSelectElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first SELECT element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLSelectElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement07.html
new file mode 100644
index 0000000000..0bcaef7c5b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the second SELECT element and
+ examine its form element.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458
+*/
+function HTMLSelectElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement07</h2>
+<p>&lt;test name='HTMLSelectElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the second SELECT element and
+ examine its form element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20489458</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLSelectElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement08.html
new file mode 100644
index 0000000000..05d58530ef
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement08.html
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The options attribute returns a collection of OPTION elements contained
+ by this element.
+
+ Retrieve the options attribute from the first SELECT element and
+ examine the items of the returned collection.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30606413
+*/
+function HTMLSelectElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement08") != null) return;
+ var nodeList;
+ var optionsnodeList;
+ var testNode;
+ var vareas;
+ var doc;
+ var optionName;
+ var voption;
+ var result = new Array();
+
+ expectedOptions = new Array();
+ expectedOptions[0] = "option";
+ expectedOptions[1] = "option";
+ expectedOptions[2] = "option";
+ expectedOptions[3] = "option";
+ expectedOptions[4] = "option";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ optionsnodeList = testNode.options;
+
+ for(var indexN10070 = 0;indexN10070 < optionsnodeList.length; indexN10070++) {
+ voption = optionsnodeList.item(indexN10070);
+ optionName = voption.nodeName;
+
+ result[result.length] = optionName;
+
+ }
+ assertEqualsListAutoCase("element", "optionsLink",expectedOptions,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement08</h2>
+<p>&lt;test name='HTMLSelectElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The options attribute returns a collection of OPTION elements contained
+ by this element.
+
+ Retrieve the options attribute from the first SELECT element and
+ examine the items of the returned collection.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30606413">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30606413</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vareas' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optionName' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='voption' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedOptions' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options interface='HTMLSelectElement' obj='testNode' var='optionsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;for-each collection='optionsnodeList' member='voption'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='voption' var='optionName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='optionName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/for-each&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedOptions' <a id="optionsLink">id='optionsLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement09.html
new file mode 100644
index 0000000000..268628c7f0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement09.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute indicates that this control is not available
+ within this context.
+
+ Retrieve the disabled attribute from the third SELECT element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79102918
+*/
+function HTMLSelectElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(2);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement09</h2>
+<p>&lt;test name='HTMLSelectElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute indicates that this control is not available
+ within this context.
+
+ Retrieve the disabled attribute from the third SELECT element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79102918">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79102918</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLSelectElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement10.html
new file mode 100644
index 0000000000..875bed5983
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The multiple attribute(if true) indicates that multiple OPTION elements
+ may be selected
+
+ Retrieve the multiple attribute from the first SELECT element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13246613
+*/
+function HTMLSelectElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vmultiple;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vmultiple = testNode.multiple;
+
+ assertTrue("multipleLink",vmultiple);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement10</h2>
+<p>&lt;test name='HTMLSelectElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The multiple attribute(if true) indicates that multiple OPTION elements
+ may be selected
+
+ Retrieve the multiple attribute from the first SELECT element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13246613">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13246613</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmultiple' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;multiple interface='HTMLSelectElement' obj='testNode' var='vmultiple'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vmultiple' <a id="multipleLink">id='multipleLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement11.html
new file mode 100644
index 0000000000..7594a3bb72
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the form control or object name when
+ submitted with a form.
+
+ Retrieve the name attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41636323
+*/
+function HTMLSelectElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","select1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement11</h2>
+<p>&lt;test name='HTMLSelectElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the form control or object name when
+ submitted with a form.
+
+ Retrieve the name attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41636323">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-41636323</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLSelectElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"select1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement12.html
new file mode 100644
index 0000000000..803b7953d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement12.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The size attribute specifies the number of visible rows.
+
+ Retrieve the size attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18293826
+*/
+function HTMLSelectElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vsize;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsize = testNode.size;
+
+ assertEquals("sizeLink",1,vsize);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement12</h2>
+<p>&lt;test name='HTMLSelectElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The size attribute specifies the number of visible rows.
+
+ Retrieve the size attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18293826">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18293826</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsize' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;size interface='HTMLSelectElement' obj='testNode' var='vsize'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsize' expected='1' <a id="sizeLink">id='sizeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement13.html
new file mode 100644
index 0000000000..7e79e15d11
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement13.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute specifies an index that represents the elements
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute from the first SELECT element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40676705
+*/
+function HTMLSelectElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",7,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement13</h2>
+<p>&lt;test name='HTMLSelectElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute specifies an index that represents the elements
+ position in the tabbing order.
+
+ Retrieve the tabIndex attribute from the first SELECT element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40676705">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40676705</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLSelectElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='7' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement14.html
new file mode 100644
index 0000000000..cf63a9f0c4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement14.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+focus should give the select element input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32130014
+*/
+function HTMLSelectElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.focus();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement14</h2>
+<p>&lt;test name='HTMLSelectElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+focus should give the select element input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32130014">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-32130014</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;focus interface='HTMLSelectElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement15.html
new file mode 100644
index 0000000000..ada148e6d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement15.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+blur should surrender input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-28216144
+*/
+function HTMLSelectElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.blur();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement15</h2>
+<p>&lt;test name='HTMLSelectElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+blur should surrender input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-28216144">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-28216144</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;blur interface='HTMLSelectElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement16.html
new file mode 100644
index 0000000000..f829270ce0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement16.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Removes an option using HTMLSelectElement.remove.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570
+*/
+function HTMLSelectElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var optLength;
+ var selected;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.remove(0);
+ optLength = testNode.length;
+
+ assertEquals("optLength",4,optLength);
+ selected = testNode.selectedIndex;
+
+ assertEquals("selected",-1,selected);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement16</h2>
+<p>&lt;test name='HTMLSelectElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Removes an option using HTMLSelectElement.remove.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selected' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;remove interface='HTMLSelectElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLSelectElement' obj='testNode' var='optLength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optLength' expected='4' <a id="optLength">id='optLength'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='selected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='selected' expected='-1' <a id="selected">id='selected'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement17.html
new file mode 100644
index 0000000000..8090af6a93
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement17.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Removes a non-existant option using HTMLSelectElement.remove.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570
+*/
+function HTMLSelectElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var optLength;
+ var selected;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.remove(6);
+ optLength = testNode.length;
+
+ assertEquals("optLength",5,optLength);
+ selected = testNode.selectedIndex;
+
+ assertEquals("selected",0,selected);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement17</h2>
+<p>&lt;test name='HTMLSelectElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Removes a non-existant option using HTMLSelectElement.remove.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-33404570</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selected' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;remove interface='HTMLSelectElement' obj='testNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLSelectElement' obj='testNode' var='optLength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optLength' expected='5' <a id="optLength">id='optLength'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='selected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='selected' expected='0' <a id="selected">id='selected'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement18.html
new file mode 100644
index 0000000000..c5839fcfa9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement18.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Add a new option at the end of an select using HTMLSelectElement.add.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106
+*/
+function HTMLSelectElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var optLength;
+ var selected;
+ var newOpt;
+ var newOptText;
+ var opt;
+ var optText;
+ var optValue;
+ var retNode;
+ var nullNode = null;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ newOpt = doc.createElement("option");
+ newOptText = doc.createTextNode("EMP31415");
+ retNode = newOpt.appendChild(newOptText);
+ testNode.add(newOpt,nullNode);
+ optLength = testNode.length;
+
+ assertEquals("optLength",6,optLength);
+ selected = testNode.selectedIndex;
+
+ assertEquals("selected",0,selected);
+ opt = testNode.lastChild;
+
+ optText = opt.firstChild;
+
+ optValue = optText.nodeValue;
+
+ assertEquals("lastValue","EMP31415",optValue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement18</h2>
+<p>&lt;test name='HTMLSelectElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Add a new option at the end of an select using HTMLSelectElement.add.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selected' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOpt' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOptText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='opt' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optValue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='retNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nullNode' type='Node' isNull='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createElement var='newOpt' obj='doc' tagName='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTextNode var='newOptText' obj='doc' data='"EMP31415"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appendChild var='retNode' obj='newOpt' newChild='newOptText'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add interface='HTMLSelectElement' obj='testNode' element='newOpt' before='nullNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLSelectElement' obj='testNode' var='optLength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optLength' expected='6' <a id="optLength">id='optLength'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='selected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='selected' expected='0' <a id="selected">id='selected'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;lastChild var='opt' obj='testNode' interface='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild var='optText' obj='opt' interface='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue var='optValue' obj='optText'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optValue' expected='"EMP31415"' <a id="lastValue">id='lastValue'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement19.html
new file mode 100644
index 0000000000..ea8b546d84
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement19.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Add a new option before the selected node using HTMLSelectElement.add.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106
+*/
+function HTMLSelectElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var optLength;
+ var selected;
+ var newOpt;
+ var newOptText;
+ var opt;
+ var optText;
+ var optValue;
+ var retNode;
+ var options;
+ var selectedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ newOpt = doc.createElement("option");
+ newOptText = doc.createTextNode("EMP31415");
+ retNode = newOpt.appendChild(newOptText);
+ options = testNode.options;
+
+ selectedNode = options.item(0);
+ testNode.add(newOpt,selectedNode);
+ optLength = testNode.length;
+
+ assertEquals("optLength",6,optLength);
+ selected = testNode.selectedIndex;
+
+ assertEquals("selected",1,selected);
+ options = testNode.options;
+
+ opt = options.item(0);
+ optText = opt.firstChild;
+
+ optValue = optText.nodeValue;
+
+ assertEquals("lastValue","EMP31415",optValue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement19</h2>
+<p>&lt;test name='HTMLSelectElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Add a new option before the selected node using HTMLSelectElement.add.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14493106</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selected' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOpt' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOptText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='opt' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optValue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='retNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='options' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selectedNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createElement var='newOpt' obj='doc' tagName='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTextNode var='newOptText' obj='doc' data='"EMP31415"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appendChild var='retNode' obj='newOpt' newChild='newOptText'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options var='options' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item var='selectedNode' obj='options' index='0' interface='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add interface='HTMLSelectElement' obj='testNode' element='newOpt' before='selectedNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLSelectElement' obj='testNode' var='optLength'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optLength' expected='6' <a id="optLength">id='optLength'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;selectedIndex interface='HTMLSelectElement' obj='testNode' var='selected'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='selected' expected='1' <a id="selected">id='selected'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options var='options' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item var='opt' obj='options' index='0' interface='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild var='optText' obj='opt' interface='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue var='optValue' obj='optText'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='optValue' expected='"EMP31415"' <a id="lastValue">id='lastValue'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement20.html
new file mode 100644
index 0000000000..328319679d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLSelectElement20.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLSelectElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "select");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Attempting to add an new option using HTMLSelectElement.add before a node that is not a child of the select
+element should raise a NOT_FOUND_ERR.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-14493106
+*/
+function HTMLSelectElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLSelectElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+ var optLength;
+ var selected;
+ var newOpt;
+ var newOptText;
+ var retNode;
+ var options;
+ var otherSelect;
+ var selectedNode;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "select");
+ nodeList = doc.getElementsByTagName("select");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ otherSelect = nodeList.item(1);
+ newOpt = doc.createElement("option");
+ newOptText = doc.createTextNode("EMP31415");
+ retNode = newOpt.appendChild(newOptText);
+ options = otherSelect.options;
+
+ selectedNode = options.item(0);
+
+ {
+ success = false;
+ try {
+ testNode.add(newOpt,selectedNode);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 8);
+ }
+ assertTrue("throw_NOT_FOUND_ERR",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLSelectElement20</h2>
+<p>&lt;test name='HTMLSelectElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLSelectElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Attempting to add an new option using HTMLSelectElement.add before a node that is not a child of the select
+element should raise a NOT_FOUND_ERR.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-14493106">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-14493106</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='optLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selected' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOpt' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newOptText' type='Text'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='retNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='options' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='otherSelect' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='selectedNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='select' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"select"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='otherSelect' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createElement var='newOpt' obj='doc' tagName='"option"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTextNode var='newOptText' obj='doc' data='"EMP31415"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appendChild var='retNode' obj='newOpt' newChild='newOptText'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;options var='options' obj='otherSelect'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item var='selectedNode' obj='options' index='0' interface='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="throw_NOT_FOUND_ERR">id='throw_NOT_FOUND_ERR'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;NOT_FOUND_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add interface='HTMLSelectElement' obj='testNode' element='newOpt' before='selectedNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/NOT_FOUND_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/select.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement01.html
new file mode 100644
index 0000000000..d7d0299df3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLStyleElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "style");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute enables/disables the stylesheet.
+
+ Retrieve the disabled attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51162010
+*/
+function HTMLStyleElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLStyleElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "style");
+ nodeList = doc.getElementsByTagName("style");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vdisabled = testNode.disabled;
+
+ assertFalse("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement01</h2>
+<p>&lt;test name='HTMLStyleElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLStyleElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute enables/disables the stylesheet.
+
+ Retrieve the disabled attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51162010">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51162010</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='style' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"style"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLStyleElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/style.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement02.html
new file mode 100644
index 0000000000..2d3836e30a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLStyleElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "style");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The media attribute identifies the intended medium of the style info.
+
+ Retrieve the media attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76412738
+*/
+function HTMLStyleElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLStyleElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vmedia;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "style");
+ nodeList = doc.getElementsByTagName("style");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vmedia = testNode.media;
+
+ assertEquals("mediaLink","screen",vmedia);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement02</h2>
+<p>&lt;test name='HTMLStyleElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLStyleElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The media attribute identifies the intended medium of the style info.
+
+ Retrieve the media attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76412738">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76412738</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vmedia' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='style' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"style"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;media interface='HTMLStyleElement' obj='testNode' var='vmedia'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vmedia' expected='"screen"' <a id="mediaLink">id='mediaLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/style.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement03.html
new file mode 100644
index 0000000000..085162e8a2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLStyleElement03.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLStyleElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "style");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the style sheet language(Internet media type).
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22472002
+*/
+function HTMLStyleElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLStyleElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "style");
+ nodeList = doc.getElementsByTagName("style");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","text/css",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLStyleElement03</h2>
+<p>&lt;test name='HTMLStyleElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLStyleElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the style sheet language(Internet media type).
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22472002">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22472002</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='style' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"style"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLStyleElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"text/css"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/style.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCaptionElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCaptionElement01.html
new file mode 100644
index 0000000000..1c14c4efe7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCaptionElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCaptionElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCaptionElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecaption");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the caption alignment with respect to
+ the table.
+
+ Retrieve the align attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79875068
+*/
+function HTMLTableCaptionElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCaptionElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecaption");
+ nodeList = doc.getElementsByTagName("caption");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCaptionElement01</h2>
+<p>&lt;test name='HTMLTableCaptionElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCaptionElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the caption alignment with respect to
+ the table.
+
+ Retrieve the align attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79875068">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79875068</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecaption' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"caption"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCaptionElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecaption.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement01.html
new file mode 100644
index 0000000000..6ba550abcb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cellIndex attribute specifies the index of this cell in the row(TH).
+
+ Retrieve the cellIndex attribute of the first TH element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
+*/
+function HTMLTableCellElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcellindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vcellindex = testNode.cellIndex;
+
+ assertEquals("cellIndexLink",0,vcellindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement01</h2>
+<p>&lt;test name='HTMLTableCellElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cellIndex attribute specifies the index of this cell in the row(TH).
+
+ Retrieve the cellIndex attribute of the first TH element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcellindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellIndex interface='HTMLTableCellElement' obj='testNode' var='vcellindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcellindex' expected='0' <a id="cellIndexLink">id='cellIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement02.html
new file mode 100644
index 0000000000..ae0f5cc064
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement02.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cellIndex attribute specifies the index of this cell in the row(TD).
+
+ Retrieve the cellIndex attribute of the first TD element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
+*/
+function HTMLTableCellElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcellindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(0);
+ vcellindex = testNode.cellIndex;
+
+ assertEquals("cellIndexLink",0,vcellindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement02</h2>
+<p>&lt;test name='HTMLTableCellElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cellIndex attribute specifies the index of this cell in the row(TD).
+
+ Retrieve the cellIndex attribute of the first TD element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcellindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellIndex interface='HTMLTableCellElement' obj='testNode' var='vcellindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcellindex' expected='0' <a id="cellIndexLink">id='cellIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement03.html
new file mode 100644
index 0000000000..f4f4ecacbe
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement03.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The abbr attribute specifies the abbreviation for table header cells(TH).
+
+ Retrieve the abbr attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
+*/
+function HTMLTableCellElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vabbr;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vabbr = testNode.abbr;
+
+ assertEquals("abbrLink","hd1",vabbr);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement03</h2>
+<p>&lt;test name='HTMLTableCellElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The abbr attribute specifies the abbreviation for table header cells(TH).
+
+ Retrieve the abbr attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vabbr' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;abbr interface='HTMLTableCellElement' obj='testNode' var='vabbr'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vabbr' expected='"hd1"' <a id="abbrLink">id='abbrLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement04.html
new file mode 100644
index 0000000000..0a4bc172a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement04.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The abbr attribute specifies the abbreviation for table data cells(TD).
+
+ Retrieve the abbr attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
+*/
+function HTMLTableCellElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vabbr;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vabbr = testNode.abbr;
+
+ assertEquals("abbrLink","hd2",vabbr);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement04</h2>
+<p>&lt;test name='HTMLTableCellElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The abbr attribute specifies the abbreviation for table data cells(TD).
+
+ Retrieve the abbr attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vabbr' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;abbr interface='HTMLTableCellElement' obj='testNode' var='vabbr'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vabbr' expected='"hd2"' <a id="abbrLink">id='abbrLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement05.html
new file mode 100644
index 0000000000..2bc8733184
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement05.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment for table
+ header cells(TH).
+
+ Retrieve the align attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
+*/
+function HTMLTableCellElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement05</h2>
+<p>&lt;test name='HTMLTableCellElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment for table
+ header cells(TH).
+
+ Retrieve the align attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCellElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement06.html
new file mode 100644
index 0000000000..bca537692b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment for table
+ data cells(TD).
+
+ Retrieve the align attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
+*/
+function HTMLTableCellElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement06</h2>
+<p>&lt;test name='HTMLTableCellElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment for table
+ data cells(TD).
+
+ Retrieve the align attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCellElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement07.html
new file mode 100644
index 0000000000..56ff764300
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The axis attribute specifies the names group of related headers for table
+ header cells(TH).
+
+ Retrieve the align attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
+*/
+function HTMLTableCellElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vaxis;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vaxis = testNode.axis;
+
+ assertEquals("axisLink","center",vaxis);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement07</h2>
+<p>&lt;test name='HTMLTableCellElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The axis attribute specifies the names group of related headers for table
+ header cells(TH).
+
+ Retrieve the align attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaxis' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;axis interface='HTMLTableCellElement' obj='testNode' var='vaxis'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaxis' expected='"center"' <a id="axisLink">id='axisLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement08.html
new file mode 100644
index 0000000000..d8ef6e2c7b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement08.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The axis attribute specifies the names group of related headers for table
+ data cells(TD).
+
+ Retrieve the axis attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
+*/
+function HTMLTableCellElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vaxis;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vaxis = testNode.axis;
+
+ assertEquals("axisLink","center",vaxis);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement08</h2>
+<p>&lt;test name='HTMLTableCellElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The axis attribute specifies the names group of related headers for table
+ data cells(TD).
+
+ Retrieve the axis attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaxis' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;axis interface='HTMLTableCellElement' obj='testNode' var='vaxis'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaxis' expected='"center"' <a id="axisLink">id='axisLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement09.html
new file mode 100644
index 0000000000..8e1f04a6b8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement09.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The bgColor attribute specifies the cells background color for
+ table header cells(TH).
+
+ Retrieve the bgColor attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
+*/
+function HTMLTableCellElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgColorLink","#00FFFF".toLowerCase(),vbgcolor.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement09</h2>
+<p>&lt;test name='HTMLTableCellElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The bgColor attribute specifies the cells background color for
+ table header cells(TH).
+
+ Retrieve the bgColor attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableCellElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#00FFFF"' <a id="bgColorLink">id='bgColorLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement10.html
new file mode 100644
index 0000000000..032bdb4877
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The bgColor attribute specifies the cells background color for table
+ data cells(TD).
+
+ Retrieve the bgColor attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
+*/
+function HTMLTableCellElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgColorLink","#FF0000".toLowerCase(),vbgcolor.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement10</h2>
+<p>&lt;test name='HTMLTableCellElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The bgColor attribute specifies the cells background color for table
+ data cells(TD).
+
+ Retrieve the bgColor attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableCellElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#FF0000"' <a id="bgColorLink">id='bgColorLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement11.html
new file mode 100644
index 0000000000..f2ebe30902
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The char attribute specifies the alignment character for cells in a column
+ of table header cells(TH).
+
+ Retrieve the char attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
+*/
+function HTMLTableCellElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("chLink",":",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement11</h2>
+<p>&lt;test name='HTMLTableCellElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The char attribute specifies the alignment character for cells in a column
+ of table header cells(TH).
+
+ Retrieve the char attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableCellElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='":"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement12.html
new file mode 100644
index 0000000000..7b72839190
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement12.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The char attribute specifies the alignment character for cells in a column
+ of table data cells(TD).
+
+ Retrieve the char attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
+*/
+function HTMLTableCellElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("chLink",":",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement12</h2>
+<p>&lt;test name='HTMLTableCellElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The char attribute specifies the alignment character for cells in a column
+ of table data cells(TD).
+
+ Retrieve the char attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableCellElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='":"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement13.html
new file mode 100644
index 0000000000..89bee078a6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement13.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charoff attribute specifies the offset of alignment characacter
+ of table header cells(TH).
+
+ Retrieve the charoff attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
+*/
+function HTMLTableCellElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcharoff = testNode.chOff;
+
+ assertEquals("chOffLink","1",vcharoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement13</h2>
+<p>&lt;test name='HTMLTableCellElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charoff attribute specifies the offset of alignment characacter
+ of table header cells(TH).
+
+ Retrieve the charoff attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableCellElement' obj='testNode' var='vcharoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharoff' expected='"1"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement14.html
new file mode 100644
index 0000000000..96e0286baf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement14.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charoff attribute specifies the offset of alignment character
+ of table data cells(TD).
+
+ Retrieve the charoff attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
+*/
+function HTMLTableCellElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcharoff = testNode.chOff;
+
+ assertEquals("chOffLink","1",vcharoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement14</h2>
+<p>&lt;test name='HTMLTableCellElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charoff attribute specifies the offset of alignment character
+ of table data cells(TD).
+
+ Retrieve the charoff attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableCellElement' obj='testNode' var='vcharoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharoff' expected='"1"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement15.html
new file mode 100644
index 0000000000..278bb4d8f4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement15.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The colSpan attribute specifies the number of columns spanned by a table
+ header(TH) cell.
+
+ Retrieve the colspan attribute of the second TH element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
+*/
+function HTMLTableCellElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var vcolspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcolspan = testNode.colSpan;
+
+ assertEquals("colSpanLink",1,vcolspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement15</h2>
+<p>&lt;test name='HTMLTableCellElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The colSpan attribute specifies the number of columns spanned by a table
+ header(TH) cell.
+
+ Retrieve the colspan attribute of the second TH element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcolspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;colSpan interface='HTMLTableCellElement' obj='testNode' var='vcolspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcolspan' expected='1' <a id="colSpanLink">id='colSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement16.html
new file mode 100644
index 0000000000..935cb0300e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement16.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The colSpan attribute specifies the number of columns spanned by a
+ table data(TD) cell.
+
+ Retrieve the colSpan attribute of the second TD element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
+*/
+function HTMLTableCellElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var vcolspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcolspan = testNode.colSpan;
+
+ assertEquals("colSpanLink",1,vcolspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement16</h2>
+<p>&lt;test name='HTMLTableCellElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The colSpan attribute specifies the number of columns spanned by a
+ table data(TD) cell.
+
+ Retrieve the colSpan attribute of the second TD element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcolspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;colSpan interface='HTMLTableCellElement' obj='testNode' var='vcolspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcolspan' expected='1' <a id="colSpanLink">id='colSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement17.html
new file mode 100644
index 0000000000..67d5ac17b8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement17.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The headers attribute specifies a list of id attribute values for
+ table header cells(TH).
+
+ Retrieve the headers attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
+*/
+function HTMLTableCellElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var vheaders;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheaders = testNode.headers;
+
+ assertEquals("headersLink","header-1",vheaders);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement17</h2>
+<p>&lt;test name='HTMLTableCellElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The headers attribute specifies a list of id attribute values for
+ table header cells(TH).
+
+ Retrieve the headers attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheaders' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;headers interface='HTMLTableCellElement' obj='testNode' var='vheaders'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheaders' expected='"header-1"' <a id="headersLink">id='headersLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement18.html
new file mode 100644
index 0000000000..8e61c56593
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement18.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The headers attribute specifies a list of id attribute values for
+ table data cells(TD).
+
+ Retrieve the headers attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
+*/
+function HTMLTableCellElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var vheaders;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheaders = testNode.headers;
+
+ assertEquals("headersLink","header-3",vheaders);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement18</h2>
+<p>&lt;test name='HTMLTableCellElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The headers attribute specifies a list of id attribute values for
+ table data cells(TD).
+
+ Retrieve the headers attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheaders' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;headers interface='HTMLTableCellElement' obj='testNode' var='vheaders'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheaders' expected='"header-3"' <a id="headersLink">id='headersLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement19.html
new file mode 100644
index 0000000000..7d13255cd0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement19.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The height attribute specifies the cell height.
+
+ Retrieve the height attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
+*/
+function HTMLTableCellElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","50",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement19</h2>
+<p>&lt;test name='HTMLTableCellElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The height attribute specifies the cell height.
+
+ Retrieve the height attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLTableCellElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"50"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement20.html
new file mode 100644
index 0000000000..249c18aba1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement20.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The height attribute specifies the cell height.
+
+ Retrieve the height attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
+*/
+function HTMLTableCellElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","50",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement20</h2>
+<p>&lt;test name='HTMLTableCellElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The height attribute specifies the cell height.
+
+ Retrieve the height attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLTableCellElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"50"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement21.html
new file mode 100644
index 0000000000..639ff2218a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement21.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The noWrap attribute supresses word wrapping.
+
+ Retrieve the noWrap attribute of the second TH Element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
+*/
+function HTMLTableCellElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement21") != null) return;
+ var nodeList;
+ var testNode;
+ var vnowrap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vnowrap = testNode.noWrap;
+
+ assertTrue("noWrapLink",vnowrap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement21</h2>
+<p>&lt;test name='HTMLTableCellElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The noWrap attribute supresses word wrapping.
+
+ Retrieve the noWrap attribute of the second TH Element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnowrap' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noWrap interface='HTMLTableCellElement' obj='testNode' var='vnowrap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vnowrap' <a id="noWrapLink">id='noWrapLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement22.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement22.html
new file mode 100644
index 0000000000..fb390e2968
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement22.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The noWrap attribute supresses word wrapping.
+
+ Retrieve the noWrap attribute of the second TD Element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
+*/
+function HTMLTableCellElement22() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement22") != null) return;
+ var nodeList;
+ var testNode;
+ var vnowrap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vnowrap = testNode.noWrap;
+
+ assertTrue("noWrapLink",vnowrap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement22</h2>
+<p>&lt;test name='HTMLTableCellElement22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The noWrap attribute supresses word wrapping.
+
+ Retrieve the noWrap attribute of the second TD Element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnowrap' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noWrap interface='HTMLTableCellElement' obj='testNode' var='vnowrap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vnowrap' <a id="noWrapLink">id='noWrapLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement23.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement23.html
new file mode 100644
index 0000000000..7c885c712e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement23.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement23</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement23'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rowSpan attribute specifies the number of rows spanned by a table
+ header(TH) cell.
+
+ Retrieve the rowSpan attribute of the second TH element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
+*/
+function HTMLTableCellElement23() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement23") != null) return;
+ var nodeList;
+ var testNode;
+ var vrowspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vrowspan = testNode.rowSpan;
+
+ assertEquals("rowSpanLink",1,vrowspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement23</h2>
+<p>&lt;test name='HTMLTableCellElement23' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement23&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rowSpan attribute specifies the number of rows spanned by a table
+ header(TH) cell.
+
+ Retrieve the rowSpan attribute of the second TH element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowSpan interface='HTMLTableCellElement' obj='testNode' var='vrowspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowspan' expected='1' <a id="rowSpanLink">id='rowSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement24.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement24.html
new file mode 100644
index 0000000000..1031269e79
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement24.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement24</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement24'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rowSpan attribute specifies the number of rows spanned by a
+ table data(TD) cell.
+
+ Retrieve the rowSpan attribute of the second TD element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
+*/
+function HTMLTableCellElement24() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement24") != null) return;
+ var nodeList;
+ var testNode;
+ var vrowspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vrowspan = testNode.rowSpan;
+
+ assertEquals("rowSpanLink",1,vrowspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement24</h2>
+<p>&lt;test name='HTMLTableCellElement24' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement24&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rowSpan attribute specifies the number of rows spanned by a
+ table data(TD) cell.
+
+ Retrieve the rowSpan attribute of the second TD element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowSpan interface='HTMLTableCellElement' obj='testNode' var='vrowspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowspan' expected='1' <a id="rowSpanLink">id='rowSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement25.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement25.html
new file mode 100644
index 0000000000..b32dec2f73
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement25.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement25</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement25'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The scope attribute specifies the scope covered by header cells.
+
+ Retrieve the scope attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
+*/
+function HTMLTableCellElement25() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement25") != null) return;
+ var nodeList;
+ var testNode;
+ var vscope;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vscope = testNode.scope;
+
+ assertEquals("scopeLink","col",vscope);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement25</h2>
+<p>&lt;test name='HTMLTableCellElement25' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement25&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The scope attribute specifies the scope covered by header cells.
+
+ Retrieve the scope attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscope' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scope interface='HTMLTableCellElement' obj='testNode' var='vscope'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscope' expected='"col"' <a id="scopeLink">id='scopeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement26.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement26.html
new file mode 100644
index 0000000000..4d1f179aee
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement26.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement26</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement26'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The scope attribute specifies the scope covered by data cells.
+
+ Retrieve the scope attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
+*/
+function HTMLTableCellElement26() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement26") != null) return;
+ var nodeList;
+ var testNode;
+ var vscope;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vscope = testNode.scope;
+
+ assertEquals("scopeLink","col",vscope);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement26</h2>
+<p>&lt;test name='HTMLTableCellElement26' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement26&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The scope attribute specifies the scope covered by data cells.
+
+ Retrieve the scope attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscope' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scope interface='HTMLTableCellElement' obj='testNode' var='vscope'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscope' expected='"col"' <a id="scopeLink">id='scopeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement27.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement27.html
new file mode 100644
index 0000000000..4eae8b05cd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement27.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement27</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement27'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of data in cell.
+
+ Retrieve the vAlign attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
+*/
+function HTMLTableCellElement27() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement27") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement27</h2>
+<p>&lt;test name='HTMLTableCellElement27' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement27&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of data in cell.
+
+ Retrieve the vAlign attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableCellElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement28.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement28.html
new file mode 100644
index 0000000000..d017964239
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement28.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement28</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement28'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of data in cell.
+
+ Retrieve the vAlign attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
+*/
+function HTMLTableCellElement28() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement28") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement28</h2>
+<p>&lt;test name='HTMLTableCellElement28' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement28&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of data in cell.
+
+ Retrieve the vAlign attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableCellElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement29.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement29.html
new file mode 100644
index 0000000000..22d5db0034
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement29.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement29</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement29'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the cells width.
+
+ Retrieve the width attribute from the second TH element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
+*/
+function HTMLTableCellElement29() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement29") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("th");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","170",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement29</h2>
+<p>&lt;test name='HTMLTableCellElement29' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement29&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the cells width.
+
+ Retrieve the width attribute from the second TH element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"th"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableCellElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"170"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement30.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement30.html
new file mode 100644
index 0000000000..834a3c4f3f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableCellElement30.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement30</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableCellElement30'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the cells width.
+
+ Retrieve the width attribute from the second TD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
+*/
+function HTMLTableCellElement30() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableCellElement30") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","175",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableCellElement30</h2>
+<p>&lt;test name='HTMLTableCellElement30' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableCellElement30&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the cells width.
+
+ Retrieve the width attribute from the second TD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableCellElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"175"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement01.html
new file mode 100644
index 0000000000..917fc4f830
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of cell data
+ in column(COL).
+
+ Retrieve the align attribute from the COL element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447
+*/
+function HTMLTableColElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement01</h2>
+<p>&lt;test name='HTMLTableColElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of cell data
+ in column(COL).
+
+ Retrieve the align attribute from the COL element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableColElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement02.html
new file mode 100644
index 0000000000..e6795a2ec3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of cell data
+ in column(COLGROUP).
+
+ Retrieve the align attribute from the COLGROUP element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447
+*/
+function HTMLTableColElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement02</h2>
+<p>&lt;test name='HTMLTableColElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of cell data
+ in column(COLGROUP).
+
+ Retrieve the align attribute from the COLGROUP element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-31128447</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableColElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement03.html
new file mode 100644
index 0000000000..b1e692809e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The char attribute specifies the alignment character for cells
+ in a column(COL).
+
+ Retrieve the char attribute from the COL element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412
+*/
+function HTMLTableColElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vch = testNode.ch;
+
+ assertEquals("chLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement03</h2>
+<p>&lt;test name='HTMLTableColElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The char attribute specifies the alignment character for cells
+ in a column(COL).
+
+ Retrieve the char attribute from the COL element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableColElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement04.html
new file mode 100644
index 0000000000..45d6f725b1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The char attribute specifies the alignment character for cells
+ in a column(COLGROUP).
+
+ Retrieve the char attribute from the COLGROUP element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412
+*/
+function HTMLTableColElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vch = testNode.ch;
+
+ assertEquals("chLink","$",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement04</h2>
+<p>&lt;test name='HTMLTableColElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The char attribute specifies the alignment character for cells
+ in a column(COLGROUP).
+
+ Retrieve the char attribute from the COLGROUP element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9447412</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableColElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"$"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement05.html
new file mode 100644
index 0000000000..737760b5ba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charoff attribute specifies offset of alignment character(COL).
+
+ Retrieve the charoff attribute from the COL element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225
+*/
+function HTMLTableColElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vchoff = testNode.chOff;
+
+ assertEquals("chLink","20",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement05</h2>
+<p>&lt;test name='HTMLTableColElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charoff attribute specifies offset of alignment character(COL).
+
+ Retrieve the charoff attribute from the COL element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableColElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"20"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement06.html
new file mode 100644
index 0000000000..c485b5f797
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement06.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The charoff attribute specifies offset of alignment character(COLGROUP).
+
+ Retrieve the charoff attribute from the COLGROUP element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225
+*/
+function HTMLTableColElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vchoff = testNode.chOff;
+
+ assertEquals("chLink","15",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement06</h2>
+<p>&lt;test name='HTMLTableColElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The charoff attribute specifies offset of alignment character(COLGROUP).
+
+ Retrieve the charoff attribute from the COLGROUP element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableColElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"15"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement07.html
new file mode 100644
index 0000000000..090fb95a7c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The span attribute indicates the number of columns in a group or affected
+ by a grouping(COL).
+
+ Retrieve the span attribute of the COL element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
+*/
+function HTMLTableColElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vspan = testNode.span;
+
+ assertEquals("spanLink",1,vspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement07</h2>
+<p>&lt;test name='HTMLTableColElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The span attribute indicates the number of columns in a group or affected
+ by a grouping(COL).
+
+ Retrieve the span attribute of the COL element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span interface='HTMLTableColElement' obj='testNode' var='vspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vspan' expected='1' <a id="spanLink">id='spanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement08.html
new file mode 100644
index 0000000000..1ab84ef4b0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement08.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The span attribute indicates the number of columns in a group or affected
+ by a grouping(COLGROUP).
+
+ Retrieve the span attribute of the COLGROUP element and examine its
+ value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
+*/
+function HTMLTableColElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vspan = testNode.span;
+
+ assertEquals("spanLink",2,vspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement08</h2>
+<p>&lt;test name='HTMLTableColElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The span attribute indicates the number of columns in a group or affected
+ by a grouping(COLGROUP).
+
+ Retrieve the span attribute of the COLGROUP element and examine its
+ value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span interface='HTMLTableColElement' obj='testNode' var='vspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vspan' expected='2' <a id="spanLink">id='spanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement09.html
new file mode 100644
index 0000000000..9c5294b9ba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement09.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of cell data
+ in column(COL).
+
+ Retrieve the vAlign attribute from the COL element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
+*/
+function HTMLTableColElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement09</h2>
+<p>&lt;test name='HTMLTableColElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of cell data
+ in column(COL).
+
+ Retrieve the vAlign attribute from the COL element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableColElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement10.html
new file mode 100644
index 0000000000..1d0dbf023d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of cell data
+ in column(COLGROUP).
+
+ Retrieve the vAlign attribute from the COLGROUP element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
+*/
+function HTMLTableColElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement10</h2>
+<p>&lt;test name='HTMLTableColElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of cell data
+ in column(COLGROUP).
+
+ Retrieve the vAlign attribute from the COLGROUP element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableColElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement11.html
new file mode 100644
index 0000000000..f4e07af382
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement11.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the default column width(COL).
+
+ Retrieve the width attribute from the COL element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
+*/
+function HTMLTableColElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","20",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement11</h2>
+<p>&lt;test name='HTMLTableColElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the default column width(COL).
+
+ Retrieve the width attribute from the COL element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableColElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"20"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement12.html
new file mode 100644
index 0000000000..685a037ca7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableColElement12.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableColElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the default column width(COLGORUP).
+
+ Retrieve the width attribute from the COLGROUP element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
+*/
+function HTMLTableColElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableColElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("colgroup");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","20",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableColElement12</h2>
+<p>&lt;test name='HTMLTableColElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the default column width(COLGORUP).
+
+ Retrieve the width attribute from the COLGROUP element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"colgroup"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableColElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"20"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement01.html
new file mode 100644
index 0000000000..7f3f16605c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement01.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The caption attribute returns the tables CAPTION.
+
+ Retrieve the align attribute of the CAPTION element from the second
+ TABLE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
+*/
+function HTMLTableElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcaption;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vcaption = testNode.caption;
+
+ valign = vcaption.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement01</h2>
+<p>&lt;test name='HTMLTableElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The caption attribute returns the tables CAPTION.
+
+ Retrieve the align attribute of the CAPTION element from the second
+ TABLE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcaption' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vcaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCaptionElement' obj='vcaption' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement02.html
new file mode 100644
index 0000000000..8a888ce495
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The caption attribute returns the tables CAPTION or void if it does not
+ exist.
+
+ Retrieve the CAPTION element from within the first TABLE element.
+ Since one does not exist it should be void.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
+*/
+function HTMLTableElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcaption;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vcaption = testNode.caption;
+
+ assertNull("captionLink",vcaption);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement02</h2>
+<p>&lt;test name='HTMLTableElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The caption attribute returns the tables CAPTION or void if it does not
+ exist.
+
+ Retrieve the CAPTION element from within the first TABLE element.
+ Since one does not exist it should be void.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcaption' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vcaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vcaption' <a id="captionLink">id='captionLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement03.html
new file mode 100644
index 0000000000..9ddb9ee6b5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement03.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tHead attribute returns the tables THEAD.
+
+ Retrieve the align attribute of the THEAD element from the second
+ TABLE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
+*/
+function HTMLTableElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement03</h2>
+<p>&lt;test name='HTMLTableElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tHead attribute returns the tables THEAD.
+
+ Retrieve the align attribute of the THEAD element from the second
+ TABLE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement04.html
new file mode 100644
index 0000000000..4d2ec31874
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tHead attribute returns the tables THEAD or null if it does not
+ exist.
+
+ Retrieve the THEAD element from within the first TABLE element.
+ Since one does not exist it should be null.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
+*/
+function HTMLTableElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsection = testNode.tHead;
+
+ assertNull("sectionLink",vsection);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement04</h2>
+<p>&lt;test name='HTMLTableElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tHead attribute returns the tables THEAD or null if it does not
+ exist.
+
+ Retrieve the THEAD element from within the first TABLE element.
+ Since one does not exist it should be null.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection' <a id="sectionLink">id='sectionLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement05.html
new file mode 100644
index 0000000000..98c07400f8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement05.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tFoot attribute returns the tables TFOOT.
+
+ Retrieve the align attribute of the TFOOT element from the second
+ TABLE element and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function HTMLTableElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement05</h2>
+<p>&lt;test name='HTMLTableElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tFoot attribute returns the tables TFOOT.
+
+ Retrieve the align attribute of the TFOOT element from the second
+ TABLE element and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement06.html
new file mode 100644
index 0000000000..d78abe3fa8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tFoot attribute returns the tables TFOOT or null if it does not
+ exist.
+
+ Retrieve the TFOOT element from within the first TABLE element.
+ Since one does not exist it should be null.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function HTMLTableElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsection = testNode.tFoot;
+
+ assertNull("sectionLink",vsection);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement06</h2>
+<p>&lt;test name='HTMLTableElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tFoot attribute returns the tables TFOOT or null if it does not
+ exist.
+
+ Retrieve the TFOOT element from within the first TABLE element.
+ Since one does not exist it should be null.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection' <a id="sectionLink">id='sectionLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement07.html
new file mode 100644
index 0000000000..d8d352c141
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement07.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute returns a collection of all the rows in the table,
+ including al in THEAD, TFOOT, all TBODY elements.
+
+ Retrieve the rows attribute from the second TABLE element and
+ examine the items of the returned collection.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016
+*/
+function HTMLTableElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement07") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var doc;
+ var rowName;
+ var vrow;
+ var result = new Array();
+
+ expectedOptions = new Array();
+ expectedOptions[0] = "tr";
+ expectedOptions[1] = "tr";
+ expectedOptions[2] = "tr";
+ expectedOptions[3] = "tr";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ for(var indexN10069 = 0;indexN10069 < rowsnodeList.length; indexN10069++) {
+ vrow = rowsnodeList.item(indexN10069);
+ rowName = vrow.nodeName;
+
+ result[result.length] = rowName;
+
+ }
+ assertEqualsListAutoCase("element", "rowsLink",expectedOptions,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement07</h2>
+<p>&lt;test name='HTMLTableElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute returns a collection of all the rows in the table,
+ including al in THEAD, TFOOT, all TBODY elements.
+
+ Retrieve the rows attribute from the second TABLE element and
+ examine the items of the returned collection.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6156016</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowName' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrow' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedOptions' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;for-each collection='rowsnodeList' member='vrow'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='vrow' var='rowName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='rowName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/for-each&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedOptions' <a id="rowsLink">id='rowsLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement08.html
new file mode 100644
index 0000000000..4863f471f3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement08.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tBodies attribute returns a collection of all the defined
+ table bodies.
+
+ Retrieve the tBodies attribute from the second TABLE element and
+ examine the items of the returned collection.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416
+*/
+function HTMLTableElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement08") != null) return;
+ var nodeList;
+ var tbodiesnodeList;
+ var testNode;
+ var doc;
+ var tbodiesName;
+ var vtbodies;
+ var result = new Array();
+
+ expectedOptions = new Array();
+ expectedOptions[0] = "tbody";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ tbodiesnodeList = testNode.tBodies;
+
+ for(var indexN10060 = 0;indexN10060 < tbodiesnodeList.length; indexN10060++) {
+ vtbodies = tbodiesnodeList.item(indexN10060);
+ tbodiesName = vtbodies.nodeName;
+
+ result[result.length] = tbodiesName;
+
+ }
+ assertEqualsListAutoCase("element", "tbodiesLink",expectedOptions,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement08</h2>
+<p>&lt;test name='HTMLTableElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tBodies attribute returns a collection of all the defined
+ table bodies.
+
+ Retrieve the tBodies attribute from the second TABLE element and
+ examine the items of the returned collection.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesName' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtbodies' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedOptions' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;for-each collection='tbodiesnodeList' member='vtbodies'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='vtbodies' var='tbodiesName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='tbodiesName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/for-each&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedOptions' <a id="tbodiesLink">id='tbodiesLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement09.html
new file mode 100644
index 0000000000..3a971c920d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement09.html
@@ -0,0 +1,157 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tBodies attribute returns a collection of all the defined
+ table bodies.
+
+ Retrieve the tBodies attribute from the third TABLE element and
+ examine the items of the returned collection. Tests multiple TBODY
+ elements.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416
+*/
+function HTMLTableElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement09") != null) return;
+ var nodeList;
+ var tbodiesnodeList;
+ var testNode;
+ var doc;
+ var tbodiesName;
+ var vtbodies;
+ var result = new Array();
+
+ expectedOptions = new Array();
+ expectedOptions[0] = "tbody";
+ expectedOptions[1] = "tbody";
+ expectedOptions[2] = "tbody";
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(2);
+ tbodiesnodeList = testNode.tBodies;
+
+ for(var indexN10066 = 0;indexN10066 < tbodiesnodeList.length; indexN10066++) {
+ vtbodies = tbodiesnodeList.item(indexN10066);
+ tbodiesName = vtbodies.nodeName;
+
+ result[result.length] = tbodiesName;
+
+ }
+ assertEqualsListAutoCase("element", "tbodiesLink",expectedOptions,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement09</h2>
+<p>&lt;test name='HTMLTableElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tBodies attribute returns a collection of all the defined
+ table bodies.
+
+ Retrieve the tBodies attribute from the third TABLE element and
+ examine the items of the returned collection. Tests multiple TBODY
+ elements.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63206416</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesName' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtbodies' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedOptions' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;for-each collection='tbodiesnodeList' member='vtbodies'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeName obj='vtbodies' var='tbodiesName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='tbodiesName'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/for-each&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedOptions' <a id="tbodiesLink">id='tbodiesLink'</a> ignoreCase='auto'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement10.html
new file mode 100644
index 0000000000..b070679933
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the table's position with respect to the
+ rest of the document.
+
+ Retrieve the align attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977
+*/
+function HTMLTableElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement10</h2>
+<p>&lt;test name='HTMLTableElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the table's position with respect to the
+ rest of the document.
+
+ Retrieve the align attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement11.html
new file mode 100644
index 0000000000..08dcfb0cc8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement11.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The bgColor attribute specifies cell background color.
+
+ Retrieve the bgColor attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985
+*/
+function HTMLTableElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgColorLink","#ff0000",vbgcolor);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement11</h2>
+<p>&lt;test name='HTMLTableElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The bgColor attribute specifies cell background color.
+
+ Retrieve the bgColor attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#ff0000"' <a id="bgColorLink">id='bgColorLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement12.html
new file mode 100644
index 0000000000..773d84d638
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement12.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The border attribute specifies the width of the border around the table.
+
+ Retrieve the border attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400
+*/
+function HTMLTableElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vborder = testNode.border;
+
+ assertEquals("borderLink","4",vborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement12</h2>
+<p>&lt;test name='HTMLTableElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The border attribute specifies the width of the border around the table.
+
+ Retrieve the border attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;border interface='HTMLTableElement' obj='testNode' var='vborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vborder' expected='"4"' <a id="borderLink">id='borderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement13.html
new file mode 100644
index 0000000000..68c78c1389
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement13.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cellpadding attribute specifies the horizontal and vertical space
+ between cell content and cell borders.
+
+ Retrieve the cellpadding attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158
+*/
+function HTMLTableElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var vcellpadding;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vcellpadding = testNode.cellPadding;
+
+ assertEquals("cellPaddingLink","2",vcellpadding);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement13</h2>
+<p>&lt;test name='HTMLTableElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cellpadding attribute specifies the horizontal and vertical space
+ between cell content and cell borders.
+
+ Retrieve the cellpadding attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcellpadding' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellPadding interface='HTMLTableElement' obj='testNode' var='vcellpadding'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcellpadding' expected='"2"' <a id="cellPaddingLink">id='cellPaddingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement14.html
new file mode 100644
index 0000000000..c63ba0faea
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement14.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cellSpacing attribute specifies the horizontal and vertical separation
+ between cells.
+
+ Retrieve the cellSpacing attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883
+*/
+function HTMLTableElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var cellSpacing;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ cellSpacing = testNode.cellSpacing;
+
+ assertEquals("cellSpacingLink","2",cellSpacing);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement14</h2>
+<p>&lt;test name='HTMLTableElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cellSpacing attribute specifies the horizontal and vertical separation
+ between cells.
+
+ Retrieve the cellSpacing attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellSpacing' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellSpacing interface='HTMLTableElement' obj='testNode' var='cellSpacing'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='cellSpacing' expected='"2"' <a id="cellSpacingLink">id='cellSpacingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement15.html
new file mode 100644
index 0000000000..8d1b2f7604
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement15.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The frame attribute specifies which external table borders to render.
+
+ Retrieve the frame attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476
+*/
+function HTMLTableElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var vframe;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vframe = testNode.frame;
+
+ assertEquals("frameLink","border",vframe);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement15</h2>
+<p>&lt;test name='HTMLTableElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The frame attribute specifies which external table borders to render.
+
+ Retrieve the frame attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vframe' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;frame interface='HTMLTableElement' obj='testNode' var='vframe'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vframe' expected='"border"' <a id="frameLink">id='frameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement16.html
new file mode 100644
index 0000000000..872086b3e2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement16.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rules attribute specifies which internal table borders to render.
+
+ Retrieve the rules attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553
+*/
+function HTMLTableElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var vrules;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vrules = testNode.rules;
+
+ assertEquals("rulesLink","all",vrules);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement16</h2>
+<p>&lt;test name='HTMLTableElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rules attribute specifies which internal table borders to render.
+
+ Retrieve the rules attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrules' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rules interface='HTMLTableElement' obj='testNode' var='vrules'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrules' expected='"all"' <a id="rulesLink">id='rulesLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement17.html
new file mode 100644
index 0000000000..afb9bd3f75
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement17.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The summary attribute is a description about the purpose or structure
+ of a table.
+
+ Retrieve the summary attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528
+*/
+function HTMLTableElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var vsummary;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsummary = testNode.summary;
+
+ assertEquals("summaryLink","HTML Control Table",vsummary);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement17</h2>
+<p>&lt;test name='HTMLTableElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The summary attribute is a description about the purpose or structure
+ of a table.
+
+ Retrieve the summary attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsummary' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;summary interface='HTMLTableElement' obj='testNode' var='vsummary'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsummary' expected='"HTML Control Table"' <a id="summaryLink">id='summaryLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement18.html
new file mode 100644
index 0000000000..47825f49b8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement18.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The width attribute specifies the desired table width.
+
+ Retrieve the width attribute of the first TABLE element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361
+*/
+function HTMLTableElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","680",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement18</h2>
+<p>&lt;test name='HTMLTableElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The width attribute specifies the desired table width.
+
+ Retrieve the width attribute of the first TABLE element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"680"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement19.html
new file mode 100644
index 0000000000..572d2b963c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement19.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createTHead() method creates a table header row or returns
+ an existing one.
+
+ Create a new THEAD element on the first TABLE element. The first
+ TABLE element should return null to make sure one doesn't exist.
+ After creation of the THEAD element the value is once again
+ checked and should not be null.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345
+*/
+function HTMLTableElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var newHead;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsection1 = testNode.tHead;
+
+ assertNull("vsection1Id",vsection1);
+ newHead = testNode.createTHead();
+ vsection2 = testNode.tHead;
+
+ assertNotNull("vsection2Id",vsection2);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement19</h2>
+<p>&lt;test name='HTMLTableElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createTHead() method creates a table header row or returns
+ an existing one.
+
+ Create a new THEAD element on the first TABLE element. The first
+ TABLE element should return null to make sure one doesn't exist.
+ After creation of the THEAD element the value is once again
+ checked and should not be null.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newHead' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTHead interface='HTMLTableElement' obj='testNode' var='newHead'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection2' <a id="vsection2Id">id='vsection2Id'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement20.html
new file mode 100644
index 0000000000..ba10424562
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement20.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createTHead() method creates a table header row or returns
+ an existing one.
+
+ Try to create a new THEAD element on the second TABLE element.
+ Since a THEAD element already exists in the TABLE element a new
+ THEAD element is not created and information from the already
+ existing THEAD element is returned.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345
+*/
+function HTMLTableElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var newHead;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ newHead = testNode.createTHead();
+ vsection = testNode.tHead;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement20</h2>
+<p>&lt;test name='HTMLTableElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createTHead() method creates a table header row or returns
+ an existing one.
+
+ Try to create a new THEAD element on the second TABLE element.
+ Since a THEAD element already exists in the TABLE element a new
+ THEAD element is not created and information from the already
+ existing THEAD element is returned.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70313345</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newHead' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTHead interface='HTMLTableElement' obj='testNode' var='newHead'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement21.html
new file mode 100644
index 0000000000..a10acbf56e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement21.html
@@ -0,0 +1,164 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteTHead() method deletes the header from the table.
+
+ The deleteTHead() method will delete the THEAD Element from the
+ second TABLE element. First make sure that the THEAD element exists
+ and then count the number of rows. After the THEAD element is
+ deleted there should be one less row.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38310198
+*/
+function HTMLTableElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement21") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var vrows;
+ var doc;
+ var result = new Array();
+
+ expectedResult = new Array();
+ expectedResult[0] = 4;
+ expectedResult[1] = 3;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection1 = testNode.tHead;
+
+ assertNotNull("vsection1Id",vsection1);
+rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ result[result.length] = vrows;
+testNode.deleteTHead();
+ vsection2 = testNode.tHead;
+
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ result[result.length] = vrows;
+assertEqualsList("rowsLink",expectedResult,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement21</h2>
+<p>&lt;test name='HTMLTableElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteTHead() method deletes the header from the table.
+
+ The deleteTHead() method will delete the THEAD Element from the
+ second TABLE element. First make sure that the THEAD element exists
+ and then count the number of rows. After the THEAD element is
+ deleted there should be one less row.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38310198">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38310198</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedResult' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteTHead obj='testNode' interface='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedResult' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement22.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement22.html
new file mode 100644
index 0000000000..234280236a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement22.html
@@ -0,0 +1,149 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createTFoot() method creates a table footer row or returns
+ an existing one.
+
+ Create a new TFOOT element on the first TABLE element. The first
+ TABLE element should return null to make sure one doesn't exist.
+ After creation of the TFOOT element the value is once again
+ checked and should not be null.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710
+*/
+function HTMLTableElement22() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement22") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var newFoot;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsection1 = testNode.tFoot;
+
+ assertNull("vsection1Id",vsection1);
+ newFoot = testNode.createTFoot();
+ vsection2 = testNode.tFoot;
+
+ assertNotNull("vsection2Id",vsection2);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement22</h2>
+<p>&lt;test name='HTMLTableElement22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createTFoot() method creates a table footer row or returns
+ an existing one.
+
+ Create a new TFOOT element on the first TABLE element. The first
+ TABLE element should return null to make sure one doesn't exist.
+ After creation of the TFOOT element the value is once again
+ checked and should not be null.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newFoot' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTFoot interface='HTMLTableElement' obj='testNode' var='newFoot'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection2' <a id="vsection2Id">id='vsection2Id'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement23.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement23.html
new file mode 100644
index 0000000000..773012256e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement23.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement23</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement23'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createTFoot() method creates a table footer row or returns
+ an existing one.
+
+ Try to create a new TFOOT element on the second TABLE element.
+ Since a TFOOT element already exists in the TABLE element a new
+ TFOOT element is not created and information from the already
+ existing TFOOT element is returned.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710
+*/
+function HTMLTableElement23() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement23") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var newFoot;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ newFoot = testNode.createTFoot();
+ vsection = testNode.tFoot;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement23</h2>
+<p>&lt;test name='HTMLTableElement23' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement23&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createTFoot() method creates a table footer row or returns
+ an existing one.
+
+ Try to create a new TFOOT element on the second TABLE element.
+ Since a TFOOT element already exists in the TABLE element a new
+ TFOOT element is not created and information from the already
+ existing TFOOT element is returned.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8453710</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newFoot' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createTFoot interface='HTMLTableElement' obj='testNode' var='newFoot'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement24.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement24.html
new file mode 100644
index 0000000000..c87461a1ab
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement24.html
@@ -0,0 +1,164 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement24</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement24'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteTFoot() method deletes the footer from the table.
+
+ The deleteTFoot() method will delete the TFOOT Element from the
+ second TABLE element. First make sure that the TFOOT element exists
+ and then count the number of rows. After the TFOOT element is
+ deleted there should be one less row.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78363258
+*/
+function HTMLTableElement24() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement24") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var vrows;
+ var doc;
+ var result = new Array();
+
+ expectedResult = new Array();
+ expectedResult[0] = 4;
+ expectedResult[1] = 3;
+
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection1 = testNode.tFoot;
+
+ assertNotNull("vsection1Id",vsection1);
+rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ result[result.length] = vrows;
+testNode.deleteTFoot();
+ vsection2 = testNode.tFoot;
+
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ result[result.length] = vrows;
+assertEqualsList("rowsLink",expectedResult,result);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement24</h2>
+<p>&lt;test name='HTMLTableElement24' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement24&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteTFoot() method deletes the footer from the table.
+
+ The deleteTFoot() method will delete the TFOOT Element from the
+ second TABLE element. First make sure that the TFOOT element exists
+ and then count the number of rows. After the TFOOT element is
+ deleted there should be one less row.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78363258">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-78363258</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='result' type='List'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='expectedResult' type='List'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;member/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/var&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteTFoot obj='testNode' interface='HTMLTableElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;append collection='result' item='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='result' expected='expectedResult' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement25.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement25.html
new file mode 100644
index 0000000000..5b0c03ee2e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement25.html
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement25</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement25'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createCaption() method creates a new table caption object or returns
+ an existing one.
+
+ Create a new CAPTION element on the first TABLE element. Since
+ one does not currently exist the CAPTION element is created.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263
+*/
+function HTMLTableElement25() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement25") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var newCaption;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vsection1 = testNode.caption;
+
+ assertNull("vsection1Id",vsection1);
+ newCaption = testNode.createCaption();
+ vsection2 = testNode.caption;
+
+ assertNotNull("vsection2Id",vsection2);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement25</h2>
+<p>&lt;test name='HTMLTableElement25' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement25&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createCaption() method creates a new table caption object or returns
+ an existing one.
+
+ Create a new CAPTION element on the first TABLE element. Since
+ one does not currently exist the CAPTION element is created.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCaption' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createCaption interface='HTMLTableElement' obj='testNode' var='newCaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection2' <a id="vsection2Id">id='vsection2Id'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement26.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement26.html
new file mode 100644
index 0000000000..68807e72aa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement26.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement26</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement26'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The createCaption() method creates a new table caption object or returns
+ an existing one.
+
+ Create a new CAPTION element on the first TABLE element. Since
+ one currently exists the CAPTION element is not created and you
+ can get the align attribute from the CAPTION element that exists.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263
+*/
+function HTMLTableElement26() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement26") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection1;
+ var vcaption;
+ var newCaption;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection1 = testNode.caption;
+
+ assertNotNull("vsection1Id",vsection1);
+newCaption = testNode.createCaption();
+ vcaption = testNode.caption;
+
+ valign = vcaption.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement26</h2>
+<p>&lt;test name='HTMLTableElement26' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement26&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The createCaption() method creates a new table caption object or returns
+ an existing one.
+
+ Create a new CAPTION element on the first TABLE element. Since
+ one currently exists the CAPTION element is not created and you
+ can get the align attribute from the CAPTION element that exists.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96920263</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcaption' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCaption' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createCaption interface='HTMLTableElement' obj='testNode' var='newCaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vcaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCaptionElement' obj='vcaption' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement27.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement27.html
new file mode 100644
index 0000000000..33a09d04c2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement27.html
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement27</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement27'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCaption() method deletes the table caption.
+
+ Delete the CAPTION element on the second TABLE element.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22930071
+*/
+function HTMLTableElement27() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement27") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection1;
+ var vsection2;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection1 = testNode.caption;
+
+ assertNotNull("vsection1Id",vsection1);
+testNode.deleteCaption();
+ vsection2 = testNode.caption;
+
+ assertNull("vsection2Id",vsection2);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement27</h2>
+<p>&lt;test name='HTMLTableElement27' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement27&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCaption() method deletes the table caption.
+
+ Delete the CAPTION element on the second TABLE element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22930071">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-22930071</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNotNull actual='vsection1' <a id="vsection1Id">id='vsection1Id'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCaption interface='HTMLTableElement' obj='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vsection2' <a id="vsection2Id">id='vsection2Id'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement28.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement28.html
new file mode 100644
index 0000000000..5be023fcad
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement28.html
@@ -0,0 +1,159 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement28</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement28'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of 0. Currently the zero indexed row is in the THEAD
+ section of the TABLE. The number of rows in the THEAD section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the THEAD section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
+*/
+function HTMLTableElement28() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement28") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vsection1;
+ var vsection2;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsection1 = testNode.tHead;
+
+ rowsnodeList = vsection1.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(0);
+ vsection2 = testNode.tHead;
+
+ rowsnodeList = vsection2.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement28</h2>
+<p>&lt;test name='HTMLTableElement28' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement28&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of 0. Currently the zero indexed row is in the THEAD
+ section of the TABLE. The number of rows in the THEAD section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the THEAD section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection1' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection2' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement29.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement29.html
new file mode 100644
index 0000000000..7dc54e90e3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement29.html
@@ -0,0 +1,163 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement29</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement29'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of two. Currently the 2nd indexed row is in the TBODY
+ section of the TABLE. The number of rows in the TBODY section before
+ insertion of the new row is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
+*/
+function HTMLTableElement29() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement29") != null) return;
+ var nodeList;
+ var tbodiesnodeList;
+ var testNode;
+ var bodyNode;
+ var newRow;
+ var rowsnodeList;
+ var vsection1;
+ var vsection2;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ tbodiesnodeList = testNode.tBodies;
+
+ bodyNode = tbodiesnodeList.item(0);
+ rowsnodeList = bodyNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ newRow = testNode.insertRow(2);
+ tbodiesnodeList = testNode.tBodies;
+
+ bodyNode = tbodiesnodeList.item(0);
+ rowsnodeList = bodyNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement29</h2>
+<p>&lt;test name='HTMLTableElement29' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement29&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of two. Currently the 2nd indexed row is in the TBODY
+ section of the TABLE. The number of rows in the TBODY section before
+ insertion of the new row is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='bodyNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='tbodiesnodeList' var='bodyNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='bodyNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='tbodiesnodeList' var='bodyNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='bodyNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement30.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement30.html
new file mode 100644
index 0000000000..5dd3835ae3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement30.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement30</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement30'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of four. After the new row is inserted the number of rows
+ in the table should be five.
+ Also the number of rows in the TFOOT section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the TFOOT section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
+*/
+function HTMLTableElement30() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement30") != null) return;
+ var nodeList;
+ var tbodiesnodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vsection1;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",4,vrows);
+ vsection1 = testNode.tFoot;
+
+ rowsnodeList = vsection1.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink",1,vrows);
+ newRow = testNode.insertRow(4);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",5,vrows);
+ vsection1 = testNode.tFoot;
+
+ rowsnodeList = vsection1.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink3",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement30</h2>
+<p>&lt;test name='HTMLTableElement30' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement30&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of four. After the new row is inserted the number of rows
+ in the table should be five.
+ Also the number of rows in the TFOOT section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the TFOOT section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='4' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection1' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='5' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection1' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink3">id='rowsLink3'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement31.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement31.html
new file mode 100644
index 0000000000..6d6138c774
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement31.html
@@ -0,0 +1,169 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement31</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement31'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table1");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row. In addition, when
+ the table is empty the row is inserted into a TBODY which is created
+ and inserted into the table.
+
+ Load the table1 file which has a non-empty table element.
+ Create an empty TABLE element and append to the document.
+ Check to make sure that the empty TABLE element doesn't
+ have a TBODY element. Insert a new row into the empty
+ TABLE element. Check for existence of the a TBODY element
+ in the table.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903
+* @see http://lists.w3.org/Archives/Public/www-dom-ts/2002Aug/0019.html
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=502
+*/
+function HTMLTableElement31() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement31") != null) return;
+ var nodeList;
+ var testNode;
+ var tableNode;
+ var tbodiesnodeList;
+ var newRow;
+ var doc;
+ var table;
+ var tbodiesLength;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table1");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("tableSize1",1,nodeList);
+testNode = nodeList.item(0);
+ table = doc.createElement("table");
+ tableNode = testNode.appendChild(table);
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("tableSize2",2,nodeList);
+tbodiesnodeList = tableNode.tBodies;
+
+ tbodiesLength = tbodiesnodeList.length;
+
+ assertEquals("Asize3",0,tbodiesLength);
+ newRow = tableNode.insertRow(0);
+ tbodiesnodeList = tableNode.tBodies;
+
+ tbodiesLength = tbodiesnodeList.length;
+
+ assertEquals("Asize4",1,tbodiesLength);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement31</h2>
+<p>&lt;test name='HTMLTableElement31' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement31&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row. In addition, when
+ the table is empty the row is inserted into a TBODY which is created
+ and inserted into the table.
+
+ Load the table1 file which has a non-empty table element.
+ Create an empty TABLE element and append to the document.
+ Check to make sure that the empty TABLE element doesn't
+ have a TBODY element. Insert a new row into the empty
+ TABLE element. Check for existence of the a TBODY element
+ in the table.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39872903</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://lists.w3.org/Archives/Public/www-dom-ts/2002Aug/0019.html">http://lists.w3.org/Archives/Public/www-dom-ts/2002Aug/0019.html</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=502">http://www.w3.org/Bugs/Public/show_bug.cgi?id=502</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tableNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='table' type='Element'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesLength' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table1' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="tableSize1">id='tableSize1'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' index='0' var='testNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;createElement obj='doc' var='table' tagName='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appendChild obj='testNode' newChild='table' var='tableNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="tableSize2">id='tableSize2'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='tableNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length var='tbodiesLength' obj='tbodiesnodeList' interface='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='tbodiesLength' expected='0' <a id="Asize3">id='Asize3'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='tableNode' var='newRow' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='tableNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length var='tbodiesLength' obj='tbodiesnodeList' interface='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='tbodiesLength' expected='1' <a id="Asize4">id='Asize4'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table1.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement32.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement32.html
new file mode 100644
index 0000000000..5368c9788b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement32.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement32</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement32'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a table row.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of 0(first row). Currently there are four rows in the
+ table. After the deleteRow() method is called there should be
+ three rows in the table.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938
+*/
+function HTMLTableElement32() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement32") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",4,vrows);
+ testNode.deleteRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement32</h2>
+<p>&lt;test name='HTMLTableElement32' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement32&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a table row.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of 0(first row). Currently there are four rows in the
+ table. After the deleteRow() method is called there should be
+ three rows in the table.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='4' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement33.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement33.html
new file mode 100644
index 0000000000..b418ededb7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement33.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement33</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement33'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a table row.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of 3(last row). Currently there are four rows in the
+ table. The deleteRow() method is called and now there should be three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938
+*/
+function HTMLTableElement33() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement33") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",4,vrows);
+ testNode.deleteRow(3);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement33</h2>
+<p>&lt;test name='HTMLTableElement33' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement33&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a table row.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of 3(last row). Currently there are four rows in the
+ table. The deleteRow() method is called and now there should be three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-13114938</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='4' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement34.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement34.html
new file mode 100644
index 0000000000..e43e8e8236
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement34.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement34</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement34'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to insert a new row using an index of five. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only four rows.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableElement34() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement34") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+
+ {
+ success = false;
+ try {
+ newRow = testNode.insertRow(5);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableElement34",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement34</h2>
+<p>&lt;test name='HTMLTableElement34' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement34&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to insert a new row using an index of five. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only four rows.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableElement34">id='HTMLTableElement34'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement35.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement35.html
new file mode 100644
index 0000000000..b1a942ca5e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement35.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement35</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement35'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to insert a new row using an index of negative five. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableElement35() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement35") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+
+ {
+ success = false;
+ try {
+ newRow = testNode.insertRow(-5);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableElement35",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement35</h2>
+<p>&lt;test name='HTMLTableElement35' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement35&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to insert a new row using an index of negative five. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-39872903')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableElement35">id='HTMLTableElement35'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='-5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement36.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement36.html
new file mode 100644
index 0000000000..8cd5111f86
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement36.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement36</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement36'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of five. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only four rows.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableElement36() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement36") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(5);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableElement36",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement36</h2>
+<p>&lt;test name='HTMLTableElement36' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement36&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of five. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only four rows.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableElement36">id='HTMLTableElement36'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement37.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement37.html
new file mode 100644
index 0000000000..896786dfb2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement37.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement37</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement37'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of four. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is equal to the
+ number of rows.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableElement37() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement37") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(4);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableElement37",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement37</h2>
+<p>&lt;test name='HTMLTableElement37' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement37&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal the number of rows.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of four. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is equal to the
+ number of rows.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableElement37">id='HTMLTableElement37'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement38.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement38.html
new file mode 100644
index 0000000000..0b7db508f5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement38.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement38</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement38'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of negative five. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableElement38() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement38") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(-5);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableElement38",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement38</h2>
+<p>&lt;test name='HTMLTableElement38' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement38&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the second TABLE element which has four rows. Try
+ to delete a new row using an index of negative five. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-13114938')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableElement38">id='HTMLTableElement38'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='-5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement39.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement39.html
new file mode 100644
index 0000000000..61fabe6308
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement39.html
@@ -0,0 +1,177 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement39</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement39'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+ If index is -1 or equal to the number of rows, the new row
+ is appended.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of negative one.
+ The number of rows in the TBODY section before insertion with an index
+ of negative one is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903
+*/
+function HTMLTableElement39() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement39") != null) return;
+ var nodeList;
+ var tbodiesnodeList;
+ var testNode;
+ var bodyNode;
+ var newRow;
+ var rowsnodeList;
+ var vsection1;
+ var vsection2;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ tbodiesnodeList = testNode.tBodies;
+
+ bodyNode = tbodiesnodeList.item(0);
+ rowsnodeList = bodyNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ newRow = testNode.insertRow(-1);
+/* the following assumes that the row is appended to tbody
+* this is obviously wrong it should be appended to tfoot which is the end
+* of the table
+* tbodiesnodeList = testNode.tBodies;
+*
+* bodyNode = tbodiesnodeList.item(0);
+* rowsnodeList = bodyNode.rows;
+*
+* vrows = rowsnodeList.length;
+*
+* assertEquals("rowsLink2",3,vrows);
+*/
+
+ tfootNode = testNode.tFoot;
+ rowsnodeList = tfootNode.rows;
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement39</h2>
+<p>&lt;test name='HTMLTableElement39' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement39&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+ If index is -1 or equal to the number of rows, the new row
+ is appended.
+
+ Retrieve the second TABLE element and invoke the insertRow() method
+ with an index of negative one.
+ The number of rows in the TBODY section before insertion with an index
+ of negative one is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-39872903</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='tbodiesnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='bodyNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection1' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection2' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='tbodiesnodeList' var='bodyNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='bodyNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableElement' obj='testNode' var='newRow' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tBodies interface='HTMLTableElement' obj='testNode' var='tbodiesnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='tbodiesnodeList' var='bodyNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='bodyNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement40.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement40.html
new file mode 100644
index 0000000000..f2b3344003
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableElement40.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement40</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableElement40'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a table row. If the index is -1
+ the last row of the table is deleted.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of negative one. Currently there are four rows in the
+ table. The deleteRow() method is called and now there should be three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938
+*/
+function HTMLTableElement40() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableElement40") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",4,vrows);
+ testNode.deleteRow(-1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableElement40</h2>
+<p>&lt;test name='HTMLTableElement40' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableElement40&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a table row. If the index is -1
+ the last row of the table is deleted.
+
+ Retrieve the second TABLE element and invoke the deleteRow() method
+ with an index of negative one. Currently there are four rows in the
+ table. The deleteRow() method is called and now there should be three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-13114938</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='4' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableElement' obj='testNode' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement01.html
new file mode 100644
index 0000000000..2364932865
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement01.html
@@ -0,0 +1,143 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rowIndex attribute specifies the index of the row, relative to the
+ entire table, starting from 0. This is in document tree order and
+ not display order. The rowIndex does not take into account sections
+ (THEAD, TFOOT, or TBODY) within the table.
+
+ Retrieve the third TR element within the document and examine
+ its rowIndex value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567
+*/
+function HTMLTableRowElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ vrowindex = testNode.rowIndex;
+
+ assertEquals("rowIndexLink",1,vrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement01</h2>
+<p>&lt;test name='HTMLTableRowElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rowIndex attribute specifies the index of the row, relative to the
+ entire table, starting from 0. This is in document tree order and
+ not display order. The rowIndex does not take into account sections
+ (THEAD, TFOOT, or TBODY) within the table.
+
+ Retrieve the third TR element within the document and examine
+ its rowIndex value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='testNode' var='vrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowindex' expected='1' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement02.html
new file mode 100644
index 0000000000..d97296143f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the second TR(1st In THEAD) element within the document and
+ examine its sectionRowIndex value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
+*/
+function HTMLTableRowElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vsectionrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vsectionrowindex = testNode.sectionRowIndex;
+
+ assertEquals("sectionRowIndexLink",0,vsectionrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement02</h2>
+<p>&lt;test name='HTMLTableRowElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the second TR(1st In THEAD) element within the document and
+ examine its sectionRowIndex value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsectionrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;sectionRowIndex interface='HTMLTableRowElement' obj='testNode' var='vsectionrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsectionrowindex' expected='0' <a id="sectionRowIndexLink">id='sectionRowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement03.html
new file mode 100644
index 0000000000..94e1b4cb23
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the third TR(1st In TFOOT) element within the document and
+ examine its sectionRowIndex value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
+*/
+function HTMLTableRowElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vsectionrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(2);
+ vsectionrowindex = testNode.sectionRowIndex;
+
+ assertEquals("sectionRowIndexLink",0,vsectionrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement03</h2>
+<p>&lt;test name='HTMLTableRowElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the third TR(1st In TFOOT) element within the document and
+ examine its sectionRowIndex value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsectionrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;sectionRowIndex interface='HTMLTableRowElement' obj='testNode' var='vsectionrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsectionrowindex' expected='0' <a id="sectionRowIndexLink">id='sectionRowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement04.html
new file mode 100644
index 0000000000..00cde3b3a4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the fifth TR(2nd In TBODY) element within the document and
+ examine its sectionRowIndex value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901
+*/
+function HTMLTableRowElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vsectionrowindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(4);
+ vsectionrowindex = testNode.sectionRowIndex;
+
+ assertEquals("sectionRowIndexLink",1,vsectionrowindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement04</h2>
+<p>&lt;test name='HTMLTableRowElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The sectionRowIndex attribute specifies the index of this row, relative
+ to the current section(THEAD, TFOOT, or TBODY),starting from 0.
+
+ Retrieve the fifth TR(2nd In TBODY) element within the document and
+ examine its sectionRowIndex value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-79105901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsectionrowindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;sectionRowIndex interface='HTMLTableRowElement' obj='testNode' var='vsectionrowindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsectionrowindex' expected='1' <a id="sectionRowIndexLink">id='sectionRowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement05.html
new file mode 100644
index 0000000000..4a41966ed2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement05.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cells attribute specifies the collection of cells in this row.
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67349879
+*/
+function HTMLTableRowElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement05") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink",6,vcells);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement05</h2>
+<p>&lt;test name='HTMLTableRowElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cells attribute specifies the collection of cells in this row.
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67349879">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67349879</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink">id='cellsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement06.html
new file mode 100644
index 0000000000..31c48480a2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of data within
+ cells of this row.
+
+ Retrieve the align attribute of the second TR element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
+*/
+function HTMLTableRowElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement06</h2>
+<p>&lt;test name='HTMLTableRowElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of data within
+ cells of this row.
+
+ Retrieve the align attribute of the second TR element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableRowElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement07.html
new file mode 100644
index 0000000000..0ad342c73f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement07.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The bgColor attribute specifies the background color of rows.
+
+ Retrieve the bgColor attribute of the second TR element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327
+*/
+function HTMLTableRowElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgColorLink","#00FFFF".toLowerCase(),vbgcolor.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement07</h2>
+<p>&lt;test name='HTMLTableRowElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The bgColor attribute specifies the background color of rows.
+
+ Retrieve the bgColor attribute of the second TR element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableRowElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#00FFFF"' <a id="bgColorLink">id='bgColorLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement08.html
new file mode 100644
index 0000000000..851c288de6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The ch attribute specifies the alignment character for cells in a column.
+
+ Retrieve the char attribute of the second TR element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
+*/
+function HTMLTableRowElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("chLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement08</h2>
+<p>&lt;test name='HTMLTableRowElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The ch attribute specifies the alignment character for cells in a column.
+
+ Retrieve the char attribute of the second TR element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableRowElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement09.html
new file mode 100644
index 0000000000..8e4cd60f95
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the second TR element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
+*/
+function HTMLTableRowElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vchoff = testNode.chOff;
+
+ assertEquals("charOffLink","1",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement09</h2>
+<p>&lt;test name='HTMLTableRowElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the second TR element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableRowElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"1"' <a id="charOffLink">id='charOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement10.html
new file mode 100644
index 0000000000..9cbaee53f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of data within
+ cells of this row.
+
+ Retrieve the vAlign attribute of the second TR element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058
+*/
+function HTMLTableRowElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement10</h2>
+<p>&lt;test name='HTMLTableRowElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of data within
+ cells of this row.
+
+ Retrieve the vAlign attribute of the second TR element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableRowElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement11.html
new file mode 100644
index 0000000000..c938cb0125
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement11.html
@@ -0,0 +1,173 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertCell() method inserts an empty TD cell into this row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the first TD element. Invoke the
+ insertCell() which will create an empty TD cell at the
+ zero index position. Check the value of the newly created
+ cell and make sure it is null and also the numbers of cells
+ should now be seven.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016
+*/
+function HTMLTableRowElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement11") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var newCell;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(0);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","EMP0001",value);
+ newCell = testNode.insertCell(0);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",7,vcells);
+ trNode = cellsnodeList.item(0);
+ cellNode = trNode.firstChild;
+
+ assertNull("value2Link",cellNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement11</h2>
+<p>&lt;test name='HTMLTableRowElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertCell() method inserts an empty TD cell into this row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the first TD element. Invoke the
+ insertCell() which will create an empty TD cell at the
+ zero index position. Check the value of the newly created
+ cell and make sure it is null and also the numbers of cells
+ should now be seven.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-06&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCell' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"EMP0001"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertCell interface='HTMLTableRowElement' obj='testNode' var='newCell' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='7' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='cellNode' <a id="value2Link">id='value2Link'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement12.html
new file mode 100644
index 0000000000..3f208f88a3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement12.html
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertCell() method inserts an empty TD cell into this row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ insertCell() which will append the empty cell to the end of the list.
+ Check the value of the newly created cell and make sure it is null
+ and also the numbers of cells should now be seven.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016
+*/
+function HTMLTableRowElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement12") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var newCell;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(5);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","1230 North Ave. Dallas, Texas 98551",value);
+ newCell = testNode.insertCell(6);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",7,vcells);
+ trNode = cellsnodeList.item(6);
+ cellNode = trNode.firstChild;
+
+ assertNull("value2Link",cellNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement12</h2>
+<p>&lt;test name='HTMLTableRowElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertCell() method inserts an empty TD cell into this row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ insertCell() which will append the empty cell to the end of the list.
+ Check the value of the newly created cell and make sure it is null
+ and also the numbers of cells should now be seven.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-06&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68927016</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCell' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"1230 North Ave. Dallas, Texas 98551"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertCell interface='HTMLTableRowElement' obj='testNode' var='newCell' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='7' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='cellNode' <a id="value2Link">id='value2Link'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement13.html
new file mode 100644
index 0000000000..56f71638a4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement13.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method deletes a cell from the current row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the first TD element. Invoke the
+ deleteCell() method which will delete a cell from the current row.
+ Check the value of the cell at the zero index and also check
+ the number of cells which should now be five.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598
+*/
+function HTMLTableRowElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement13") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(0);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","EMP0001",value);
+ testNode.deleteCell(0);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",5,vcells);
+ trNode = cellsnodeList.item(0);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value2Link","Margaret Martin",value);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement13</h2>
+<p>&lt;test name='HTMLTableRowElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method deletes a cell from the current row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the first TD element. Invoke the
+ deleteCell() method which will delete a cell from the current row.
+ Check the value of the cell at the zero index and also check
+ the number of cells which should now be five.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-06&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"EMP0001"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='5' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"Margaret Martin"' <a id="value2Link">id='value2Link'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement14.html
new file mode 100644
index 0000000000..4faad2ce5c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement14.html
@@ -0,0 +1,172 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method deletes a cell from the current row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the third(index 2) TD element. Invoke the
+ deleteCell() method which will delete a cell from the current row.
+ Check the value of the third cell(index 2) and also check
+ the number of cells which should now be five.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598
+*/
+function HTMLTableRowElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement14") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(2);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","Accountant",value);
+ testNode.deleteCell(2);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",5,vcells);
+ trNode = cellsnodeList.item(2);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value2Link","56,000",value);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement14</h2>
+<p>&lt;test name='HTMLTableRowElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method deletes a cell from the current row.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the third(index 2) TD element. Invoke the
+ deleteCell() method which will delete a cell from the current row.
+ Check the value of the third cell(index 2) and also check
+ the number of cells which should now be five.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-06&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-11738598</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"Accountant"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='5' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"56,000"' <a id="value2Link">id='value2Link'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement15.html
new file mode 100644
index 0000000000..3cf3ed2819
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement15.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to insert a cell using an index of seven. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableRowElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var newCell;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+
+ {
+ success = false;
+ try {
+ newCell = testNode.insertCell(7);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableRowElement15",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement15</h2>
+<p>&lt;test name='HTMLTableRowElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to insert a cell using an index of seven. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCell' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableRowElement15">id='HTMLTableRowElement15'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertCell interface='HTMLTableRowElement' obj='testNode' var='newCell' index='7'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement16.html
new file mode 100644
index 0000000000..fc63764ef1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement16.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to insert a cell using an index of negative seven. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableRowElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var newCell;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+
+ {
+ success = false;
+ try {
+ newCell = testNode.insertCell(-7);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableRowElement16",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement16</h2>
+<p>&lt;test name='HTMLTableRowElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to insert a cell using an index of negative seven. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-68927016')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCell' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableRowElement16">id='HTMLTableRowElement16'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertCell interface='HTMLTableRowElement' obj='testNode' var='newCell' index='-7'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement17.html
new file mode 100644
index 0000000000..9321704af8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement17.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of seven. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableRowElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+
+ {
+ success = false;
+ try {
+ testNode.deleteCell(7);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableRowElement17",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement17</h2>
+<p>&lt;test name='HTMLTableRowElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of seven. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableRowElement17">id='HTMLTableRowElement17'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='7'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement18.html
new file mode 100644
index 0000000000..ec7bb985f4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement18.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal to the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of six. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableRowElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+
+ {
+ success = false;
+ try {
+ testNode.deleteCell(6);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableRowElement18",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement18</h2>
+<p>&lt;test name='HTMLTableRowElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal to the number of cells.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of six. This should throw
+ a INDEX_SIZE_ERR DOMException since there are only six cells.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableRowElement18">id='HTMLTableRowElement18'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement19.html
new file mode 100644
index 0000000000..6d277d373d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement19.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of negative six. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableRowElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+
+ {
+ success = false;
+ try {
+ testNode.deleteCell(-6);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableRowElement19",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement19</h2>
+<p>&lt;test name='HTMLTableRowElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the fourth TR element which has six cells. Try
+ to delete a cell using an index of negative six. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-11738598')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableRowElement19">id='HTMLTableRowElement19'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='-6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement20.html
new file mode 100644
index 0000000000..672b3f2033
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement20.html
@@ -0,0 +1,177 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertCell() method inserts an empty TD cell into this row.
+ If index is -1 or equal to the number of cells, the new cell is
+ appended.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ insertCell() with an index of negative one
+ which will append the empty cell to the end of the list.
+ Check the value of the newly created cell and make sure it is null
+ and also the numbers of cells should now be seven.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016
+*/
+function HTMLTableRowElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement20") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var newCell;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(5);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","1230 North Ave. Dallas, Texas 98551",value);
+ newCell = testNode.insertCell(-1);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",7,vcells);
+ trNode = cellsnodeList.item(6);
+ cellNode = trNode.firstChild;
+
+ assertNull("value2Link",cellNode);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement20</h2>
+<p>&lt;test name='HTMLTableRowElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertCell() method inserts an empty TD cell into this row.
+ If index is -1 or equal to the number of cells, the new cell is
+ appended.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ insertCell() with an index of negative one
+ which will append the empty cell to the end of the list.
+ Check the value of the newly created cell and make sure it is null
+ and also the numbers of cells should now be seven.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-68927016</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newCell' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"1230 North Ave. Dallas, Texas 98551"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertCell interface='HTMLTableRowElement' obj='testNode' var='newCell' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='7' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='6'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='cellNode' <a id="value2Link">id='value2Link'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement21.html
new file mode 100644
index 0000000000..65e859bd0a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableRowElement21.html
@@ -0,0 +1,176 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableRowElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteCell() method deletes a cell from the currtent row. If
+ the index is -1 the last cell in the row is deleted.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ deleteCell() with an index of negative one
+ which will delete the last cell in the row.
+ Check the value of the of the last cell
+ and also the numbers of cells should now be five.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598
+*/
+function HTMLTableRowElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableRowElement21") != null) return;
+ var nodeList;
+ var cellsnodeList;
+ var testNode;
+ var trNode;
+ var cellNode;
+ var value;
+ var vcells;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink1",6,vcells);
+ trNode = cellsnodeList.item(5);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value1Link","1230 North Ave. Dallas, Texas 98551",value);
+ testNode.deleteCell(-1);
+ testNode = nodeList.item(3);
+ cellsnodeList = testNode.cells;
+
+ vcells = cellsnodeList.length;
+
+ assertEquals("cellsLink2",5,vcells);
+ trNode = cellsnodeList.item(4);
+ cellNode = trNode.firstChild;
+
+ value = cellNode.nodeValue;
+
+ assertEquals("value2Link","Female",value);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableRowElement21</h2>
+<p>&lt;test name='HTMLTableRowElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableRowElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteCell() method deletes a cell from the currtent row. If
+ the index is -1 the last cell in the row is deleted.
+
+
+ Retrieve the fourth TR element and examine the value of
+ the cells length attribute which should be set to six.
+ Check the value of the last TD element. Invoke the
+ deleteCell() with an index of negative one
+ which will delete the last cell in the row.
+ Check the value of the of the last cell
+ and also the numbers of cells should now be five.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-11738598</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='trNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='cellNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='value' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcells' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='6' <a id="cellsLink1">id='cellsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='5'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"1230 North Ave. Dallas, Texas 98551"' <a id="value1Link">id='value1Link'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteCell interface='HTMLTableRowElement' obj='testNode' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='3'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cells interface='HTMLTableRowElement' obj='testNode' var='cellsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='cellsnodeList' var='vcells'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcells' expected='5' <a id="cellsLink2">id='cellsLink2'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='HTMLCollection' obj='cellsnodeList' var='trNode' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;firstChild interface='Node' obj='trNode' var='cellNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;nodeValue obj='cellNode' var='value'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='value' expected='"Female"' <a id="value2Link">id='value2Link'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement01.html
new file mode 100644
index 0000000000..e0cbd5d1d3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first THEAD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
+*/
+function HTMLTableSectionElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement01</h2>
+<p>&lt;test name='HTMLTableSectionElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first THEAD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement02.html
new file mode 100644
index 0000000000..c55881bfcd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement02.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first TFOOT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
+*/
+function HTMLTableSectionElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement02</h2>
+<p>&lt;test name='HTMLTableSectionElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first TFOOT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement03.html
new file mode 100644
index 0000000000..787e25b046
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first TBODY element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119
+*/
+function HTMLTableSectionElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement03</h2>
+<p>&lt;test name='HTMLTableSectionElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The align attribute specifies the horizontal alignment of data within
+ cells.
+
+ Retrieve the align attribute of the first TBODY element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-40530119</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement04.html
new file mode 100644
index 0000000000..b0fb6a4bf8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first THEAD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
+*/
+function HTMLTableSectionElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vch = testNode.ch;
+
+ assertEquals("chLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement04</h2>
+<p>&lt;test name='HTMLTableSectionElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first THEAD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableSectionElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement05.html
new file mode 100644
index 0000000000..a185d0aea1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement05.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first TFOOT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
+*/
+function HTMLTableSectionElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vch = testNode.ch;
+
+ assertEquals("chLink","+",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement05</h2>
+<p>&lt;test name='HTMLTableSectionElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first TFOOT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableSectionElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"+"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement06.html
new file mode 100644
index 0000000000..110bfacf50
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first TBODY element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012
+*/
+function HTMLTableSectionElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("chLink","$",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement06</h2>
+<p>&lt;test name='HTMLTableSectionElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The ch attribute specifies the alignment character for cells in a
+ column.
+
+ Retrieve the char attribute of the first TBODY element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83470012</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableSectionElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"$"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement07.html
new file mode 100644
index 0000000000..c7f63a5b25
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement07.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first THEAD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
+*/
+function HTMLTableSectionElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcharoff = testNode.chOff;
+
+ assertEquals("chOffLink","1",vcharoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement07</h2>
+<p>&lt;test name='HTMLTableSectionElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first THEAD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableSectionElement' obj='testNode' var='vcharoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharoff' expected='"1"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement08.html
new file mode 100644
index 0000000000..6adfbdc0f7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first TFOOT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
+*/
+function HTMLTableSectionElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcharoff = testNode.chOff;
+
+ assertEquals("chOffLink","2",vcharoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement08</h2>
+<p>&lt;test name='HTMLTableSectionElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first TFOOT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableSectionElement' obj='testNode' var='vcharoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharoff' expected='"2"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement09.html
new file mode 100644
index 0000000000..20db3cd3d9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first TBODY element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732
+*/
+function HTMLTableSectionElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vcharoff = testNode.chOff;
+
+ assertEquals("chOffLink","3",vcharoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement09</h2>
+<p>&lt;test name='HTMLTableSectionElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The chOff attribute specifies the offset of alignment character.
+
+ Retrieve the charoff attribute of the first TBODY element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-53459732</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableSectionElement' obj='testNode' var='vcharoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharoff' expected='"3"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement10.html
new file mode 100644
index 0000000000..756fa15fba
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first THEAD element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
+*/
+function HTMLTableSectionElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement10</h2>
+<p>&lt;test name='HTMLTableSectionElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first THEAD element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableSectionElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement11.html
new file mode 100644
index 0000000000..a42b1adea9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first TFOOT element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
+*/
+function HTMLTableSectionElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement11</h2>
+<p>&lt;test name='HTMLTableSectionElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first TFOOT element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableSectionElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement12.html
new file mode 100644
index 0000000000..e14140aa1e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement12.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first TBODY element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116
+*/
+function HTMLTableSectionElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement12</h2>
+<p>&lt;test name='HTMLTableSectionElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The vAlign attribute specifies the vertical alignment of cell data in
+ column.
+
+ Retrieve the vAlign attribute of the first TBODY element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-4379116</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableSectionElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement13.html
new file mode 100644
index 0000000000..ea72e4f4c9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement13.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first THEAD element and examine the value of
+ the rows length attribute.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
+*/
+function HTMLTableSectionElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement13") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement13</h2>
+<p>&lt;test name='HTMLTableSectionElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first THEAD element and examine the value of
+ the rows length attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement14.html
new file mode 100644
index 0000000000..71955d803e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement14.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first TFOOT element and examine the value of
+ the rows length attribute.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
+*/
+function HTMLTableSectionElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement14") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement14</h2>
+<p>&lt;test name='HTMLTableSectionElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first TFOOT element and examine the value of
+ the rows length attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement15.html
new file mode 100644
index 0000000000..464e10219e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement15.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first TBODY element and examine the value of
+ the rows length attribute.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650
+*/
+function HTMLTableSectionElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement15") != null) return;
+ var nodeList;
+ var rowsnodeList;
+ var testNode;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement15</h2>
+<p>&lt;test name='HTMLTableSectionElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute specifies the collection of rows in this table section.
+
+ Retrieve the first TBODY element and examine the value of
+ the rows length attribute.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-52092650</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement16.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement16.html
new file mode 100644
index 0000000000..7845ad66f4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement16.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement16</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement16'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the THEAD section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the THEAD section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+*/
+function HTMLTableSectionElement16() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement16") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement16</h2>
+<p>&lt;test name='HTMLTableSectionElement16' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement16&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the THEAD section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the THEAD section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement17.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement17.html
new file mode 100644
index 0000000000..51cb27c421
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement17.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TFOOT element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the TFOOT section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the TFOOT section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+*/
+function HTMLTableSectionElement17() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement17") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement17</h2>
+<p>&lt;test name='HTMLTableSectionElement17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TFOOT element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the TFOOT section before
+ insertion of the new row is one. After the new row is inserted the number
+ of rows in the TFOOT section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement18.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement18.html
new file mode 100644
index 0000000000..b4fffa75b2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement18.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TBODY element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the TBODY section before
+ insertion of the new row is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+*/
+function HTMLTableSectionElement18() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement18") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ newRow = testNode.insertRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement18</h2>
+<p>&lt;test name='HTMLTableSectionElement18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TBODY element and invoke the insertRow() method
+ with an index of 0. The nuber of rows in the TBODY section before
+ insertion of the new row is two. After the new row is inserted the number
+ of rows in the TBODY section is three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement19.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement19.html
new file mode 100644
index 0000000000..cdc90cd894
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement19.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of 1. The nuber of rows in the THEAD section before
+ insertion of the new row is one therefore the new row is appended.
+ After the new row is inserted the number of rows in the THEAD
+ section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+*/
+function HTMLTableSectionElement19() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement19") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement19</h2>
+<p>&lt;test name='HTMLTableSectionElement19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of 1. The nuber of rows in the THEAD section before
+ insertion of the new row is one therefore the new row is appended.
+ After the new row is inserted the number of rows in the THEAD
+ section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement20.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement20.html
new file mode 100644
index 0000000000..4992bf58f5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement20.html
@@ -0,0 +1,153 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TFOOT element and invoke the insertRow() method
+ with an index of one. The nuber of rows in the TFOOT section before
+ insertion of the new row is one therefore the new row is appended.
+ After the new row is inserted the number of rows in the TFOOT section
+ is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+*/
+function HTMLTableSectionElement20() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement20") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement20</h2>
+<p>&lt;test name='HTMLTableSectionElement20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TFOOT element and invoke the insertRow() method
+ with an index of one. The nuber of rows in the TFOOT section before
+ insertion of the new row is one therefore the new row is appended.
+ After the new row is inserted the number of rows in the TFOOT section
+ is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement21.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement21.html
new file mode 100644
index 0000000000..b75311295f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement21.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TBODY element and invoke the insertRow() method
+ with an index of two. The number of rows in the TBODY section before
+ insertion of the new row is two therefore the row is appended.
+ After the new row is inserted the number of rows in the TBODY section is
+ three.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=502
+*/
+function HTMLTableSectionElement21() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement21") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ newRow = testNode.insertRow(2);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",3,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement21</h2>
+<p>&lt;test name='HTMLTableSectionElement21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row.
+
+ Retrieve the first TBODY element and invoke the insertRow() method
+ with an index of two. The number of rows in the TBODY section before
+ insertion of the new row is two therefore the row is appended.
+ After the new row is inserted the number of rows in the TBODY section is
+ three.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93995626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=502">http://www.w3.org/Bugs/Public/show_bug.cgi?id=502</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='3' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement22.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement22.html
new file mode 100644
index 0000000000..08d024c80b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement22.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first THEAD element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the THEAD section before
+ the deletion of the row is one. After the row is deleted the number
+ of rows in the THEAD section is zero.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
+*/
+function HTMLTableSectionElement22() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement22") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ testNode.deleteRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",0,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement22</h2>
+<p>&lt;test name='HTMLTableSectionElement22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first THEAD element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the THEAD section before
+ the deletion of the row is one. After the row is deleted the number
+ of rows in the THEAD section is zero.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='0' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement23.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement23.html
new file mode 100644
index 0000000000..18e65d2921
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement23.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement23</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement23'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first TFOOT element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the TFOOT section before
+ the deletion of the row is one. After the row is deleted the number
+ of rows in the TFOOT section is zero.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
+*/
+function HTMLTableSectionElement23() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement23") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tfoot");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ testNode.deleteRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",0,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement23</h2>
+<p>&lt;test name='HTMLTableSectionElement23' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement23&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first TFOOT element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the TFOOT section before
+ the deletion of the row is one. After the row is deleted the number
+ of rows in the TFOOT section is zero.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tfoot"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='0' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement24.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement24.html
new file mode 100644
index 0000000000..fc6c22bdb1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement24.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement24</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement24'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first TBODY element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the TBODY section before
+ the deletion of the row is two. After the row is deleted the number
+ of rows in the TBODY section is one.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626
+*/
+function HTMLTableSectionElement24() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement24") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ testNode.deleteRow(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement24</h2>
+<p>&lt;test name='HTMLTableSectionElement24' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement24&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a row from this section.
+
+ Retrieve the first TBODY element and invoke the deleteRow() method
+ with an index of 0. The nuber of rows in the TBODY section before
+ the deletion of the row is two. After the row is deleted the number
+ of rows in the TBODY section is one.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-5625626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement25.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement25.html
new file mode 100644
index 0000000000..b83549acbd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement25.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement25</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement25'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to insert a new row using an index of two. This should throw
+ a INDEX_SIZE_ERR DOMException since there is only one row.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableSectionElement25() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement25") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+
+ {
+ success = false;
+ try {
+ newRow = testNode.insertRow(2);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableSectionElement25",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement25</h2>
+<p>&lt;test name='HTMLTableSectionElement25' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement25&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to insert a new row using an index of two. This should throw
+ a INDEX_SIZE_ERR DOMException since there is only one row.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableSectionElement25">id='HTMLTableSectionElement25'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement26.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement26.html
new file mode 100644
index 0000000000..6937d9840f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement26.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement26</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement26'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the first THEAD element which has one row. Try
+ to insert a new row using an index of negative two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableSectionElement26() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement26") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+
+ {
+ success = false;
+ try {
+ newRow = testNode.insertRow(-2);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableSectionElement26",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement26</h2>
+<p>&lt;test name='HTMLTableSectionElement26' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement26&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the first THEAD element which has one row. Try
+ to insert a new row using an index of negative two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-93995626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableSectionElement26">id='HTMLTableSectionElement26'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='-2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement27.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement27.html
new file mode 100644
index 0000000000..ecf41f818c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement27.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement27</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement27'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is greater than the
+ number of rows.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableSectionElement27() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement27") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(2);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableSectionElement27",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement27</h2>
+<p>&lt;test name='HTMLTableSectionElement27' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement27&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is greater than the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is greater than the
+ number of rows.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableSectionElement27">id='HTMLTableSectionElement27'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement28.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement28.html
new file mode 100644
index 0000000000..aee22a0d75
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement28.html
@@ -0,0 +1,152 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement28</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement28'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal to the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of 1. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is equal to the
+ number of rows.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableSectionElement28() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement28") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(1);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableSectionElement28",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement28</h2>
+<p>&lt;test name='HTMLTableSectionElement28' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement28&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is equal to the number of rows.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of 1. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is equal to the
+ number of rows.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableSectionElement28">id='HTMLTableSectionElement28'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement29.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement29.html
new file mode 100644
index 0000000000..8339ee5c7b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement29.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement29</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement29'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of negative two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])
+*/
+function HTMLTableSectionElement29() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement29") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+
+ {
+ success = false;
+ try {
+ testNode.deleteRow(-2);
+ }
+ catch(ex) {
+ success = (typeof(ex.code) != 'undefined' && ex.code == 1);
+ }
+ assertTrue("HTMLTableSectionElement29",success);
+ }
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement29</h2>
+<p>&lt;test name='HTMLTableSectionElement29' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement29&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method throws a INDEX_SIZE_ERR DOMException
+ if the specified index is negative.
+
+ Retrieve the first THEAD element which has one row. Try
+ to delete a row using an index of negative two. This should throw
+ a INDEX_SIZE_ERR DOMException since the index is negative.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-05-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#xpointer(id('ID-5625626')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertDOMException <a id="HTMLTableSectionElement29">id='HTMLTableSectionElement29'</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='-2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/INDEX_SIZE_ERR&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/assertDOMException&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement30.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement30.html
new file mode 100644
index 0000000000..2790c58f31
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement30.html
@@ -0,0 +1,159 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement30</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement30'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The insertRow() method inserts a new empty table row. The new
+ row is inserted immediately before the current indexth row in this
+ section. If index is -1 or equal to the number of rows in this section,
+ the new row is appended.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of negative one. Since the index is negative one the
+ new row is appended.
+ After the new row is appended the number of rows in the THEAD
+ section is two.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626
+*/
+function HTMLTableSectionElement30() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement30") != null) return;
+ var nodeList;
+ var testNode;
+ var newRow;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("thead");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",1,vrows);
+ newRow = testNode.insertRow(-1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",2,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement30</h2>
+<p>&lt;test name='HTMLTableSectionElement30' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement30&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The insertRow() method inserts a new empty table row. The new
+ row is inserted immediately before the current indexth row in this
+ section. If index is -1 or equal to the number of rows in this section,
+ the new row is appended.
+
+ Retrieve the first THEAD element and invoke the insertRow() method
+ with an index of negative one. Since the index is negative one the
+ new row is appended.
+ After the new row is appended the number of rows in the THEAD
+ section is two.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-93995626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='newRow' type='HTMLElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"thead"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;insertRow interface='HTMLTableSectionElement' obj='testNode' var='newRow' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement31.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement31.html
new file mode 100644
index 0000000000..e43feb2d07
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTableSectionElement31.html
@@ -0,0 +1,156 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement31</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTableSectionElement31'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The deleteRow() method deletes a row from this section. The index
+ starts from 0 and is relative only to the rows contained inside
+ this section, not all the rows in the table. If the index is -1
+ the last row will be deleted.
+
+ Retrieve the second TBODY element and invoke the deleteRow() method
+ with an index of -1. The nuber of rows in the THEAD section before
+ the deletion of the row is two. After the row is deleted the number
+ of rows in the TBODY section is one.
+
+* @author NIST
+* @author Rick Rivello
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626
+*/
+function HTMLTableSectionElement31() {
+ var success;
+ if(checkInitialization(builder, "HTMLTableSectionElement31") != null) return;
+ var nodeList;
+ var testNode;
+ var rowsnodeList;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("tbody");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink1",2,vrows);
+ testNode.deleteRow(-1);
+ rowsnodeList = testNode.rows;
+
+ vrows = rowsnodeList.length;
+
+ assertEquals("rowsLink2",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTableSectionElement31</h2>
+<p>&lt;test name='HTMLTableSectionElement31' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableSectionElement31&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The deleteRow() method deletes a row from this section. The index
+ starts from 0 and is relative only to the rows contained inside
+ this section, not all the rows in the table. If the index is -1
+ the last row will be deleted.
+
+ Retrieve the second TBODY element and invoke the deleteRow() method
+ with an index of -1. The nuber of rows in the THEAD section before
+ the deletion of the row is two. After the row is deleted the number
+ of rows in the TBODY section is one.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Rick Rivello&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-11-07&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-5625626</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='rowsnodeList' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tbody"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='2' <a id="rowsLink1">id='rowsLink1'</a> ignoreCase='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;deleteRow interface='HTMLTableSectionElement' obj='testNode' index='-1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='testNode' var='rowsnodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='rowsnodeList' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="rowsLink2">id='rowsLink2'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement01.html
new file mode 100644
index 0000000000..dd0a7504e5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement01.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The defaultValue attribute represents the HTML value of the attribute
+ when the type attribute has the value of "Text", "File" or "Password".
+
+ Retrieve the defaultValue attribute of the 2nd TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36152213
+*/
+function HTMLTextAreaElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vdefaultvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vdefaultvalue = testNode.defaultValue;
+
+ assertEquals("defaultValueLink","TEXTAREA2",vdefaultvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement01</h2>
+<p>&lt;test name='HTMLTextAreaElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The defaultValue attribute represents the HTML value of the attribute
+ when the type attribute has the value of "Text", "File" or "Password".
+
+ Retrieve the defaultValue attribute of the 2nd TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36152213">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36152213</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdefaultvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;defaultValue interface='HTMLTextAreaElement' obj='testNode' var='vdefaultvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdefaultvalue' expected='"TEXTAREA2"' <a id="defaultValueLink">id='defaultValueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement02.html
new file mode 100644
index 0000000000..af9f31a9e3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement02.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first TEXTAREA element
+ and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464
+*/
+function HTMLTextAreaElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var fNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ fNode = testNode.form;
+
+ vform = fNode.id;
+
+ assertEquals("formLink","form1",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement02</h2>
+<p>&lt;test name='HTMLTextAreaElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns the FORM element containing this control.
+
+ Retrieve the form attribute from the first TEXTAREA element
+ and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='fNode' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLTextAreaElement' obj='testNode' var='fNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id obj='fNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vform' expected='"form1"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement03.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement03.html
new file mode 100644
index 0000000000..13c9df10ec
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement03.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the second TEXTAREA element and
+ examine its form element.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464
+*/
+function HTMLTextAreaElement03() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement03") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formNullLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement03</h2>
+<p>&lt;test name='HTMLTextAreaElement03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The form attribute returns null if control in not within the context of
+ a form.
+
+ Retrieve the second TEXTAREA element and
+ examine its form element.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18911464</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLTextAreaElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formNullLink">id='formNullLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement04.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement04.html
new file mode 100644
index 0000000000..08d3f82673
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement04.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The accessKey attribute specifies a single character access key to
+ give access to the form control.
+
+ Retrieve the accessKey attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93102991
+*/
+function HTMLTextAreaElement04() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement04") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","c",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement04</h2>
+<p>&lt;test name='HTMLTextAreaElement04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The accessKey attribute specifies a single character access key to
+ give access to the form control.
+
+ Retrieve the accessKey attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93102991">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-93102991</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLTextAreaElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"c"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement05.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement05.html
new file mode 100644
index 0000000000..4acdbf740b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement05.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The cols attribute specifies the width of control(in characters).
+
+ Retrieve the cols attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51387225
+*/
+function HTMLTextAreaElement05() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement05") != null) return;
+ var nodeList;
+ var testNode;
+ var vcols;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vcols = testNode.cols;
+
+ assertEquals("colsLink",20,vcols);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement05</h2>
+<p>&lt;test name='HTMLTextAreaElement05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The cols attribute specifies the width of control(in characters).
+
+ Retrieve the cols attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51387225">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-51387225</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcols' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cols interface='HTMLTextAreaElement' obj='testNode' var='vcols'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcols' expected='20' <a id="colsLink">id='colsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement06.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement06.html
new file mode 100644
index 0000000000..3049fd2d12
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement06.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The disabled attribute specifies the control is unavailable in this
+ context.
+
+ Retrieve the disabled attribute from the 2nd TEXTAREA element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98725443
+*/
+function HTMLTextAreaElement06() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement06") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement06</h2>
+<p>&lt;test name='HTMLTextAreaElement06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The disabled attribute specifies the control is unavailable in this
+ context.
+
+ Retrieve the disabled attribute from the 2nd TEXTAREA element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98725443">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98725443</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLTextAreaElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement07.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement07.html
new file mode 100644
index 0000000000..ae49b1668d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The name attribute specifies the form control or object name when
+ submitted with a form.
+
+ Retrieve the name attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715578
+*/
+function HTMLTextAreaElement07() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement07") != null) return;
+ var nodeList;
+ var testNode;
+ var vname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vname = testNode.name;
+
+ assertEquals("nameLink","text1",vname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement07</h2>
+<p>&lt;test name='HTMLTextAreaElement07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The name attribute specifies the form control or object name when
+ submitted with a form.
+
+ Retrieve the name attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715578">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715578</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;name interface='HTMLTextAreaElement' obj='testNode' var='vname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vname' expected='"text1"' <a id="nameLink">id='nameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement08.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement08.html
new file mode 100644
index 0000000000..615758b6d8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement08.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The readOnly attribute specifies this control is read-only.
+
+ Retrieve the readOnly attribute from the 3rd TEXTAREA element and
+ examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39131423
+*/
+function HTMLTextAreaElement08() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement08") != null) return;
+ var nodeList;
+ var testNode;
+ var vreadonly;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(2);
+ vreadonly = testNode.readOnly;
+
+ assertTrue("readOnlyLink",vreadonly);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement08</h2>
+<p>&lt;test name='HTMLTextAreaElement08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The readOnly attribute specifies this control is read-only.
+
+ Retrieve the readOnly attribute from the 3rd TEXTAREA element and
+ examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39131423">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39131423</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vreadonly' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='2'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;readOnly interface='HTMLTextAreaElement' obj='testNode' var='vreadonly'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vreadonly' <a id="readOnlyLink">id='readOnlyLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement09.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement09.html
new file mode 100644
index 0000000000..e15e92d010
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement09.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The rows attribute specifies the number of text rowns.
+
+ Retrieve the rows attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46975887
+*/
+function HTMLTextAreaElement09() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement09") != null) return;
+ var nodeList;
+ var testNode;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vrows = testNode.rows;
+
+ assertEquals("rowsLink",7,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement09</h2>
+<p>&lt;test name='HTMLTextAreaElement09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The rows attribute specifies the number of text rowns.
+
+ Retrieve the rows attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46975887">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46975887</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTextAreaElement' obj='testNode' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='7' <a id="rowsLink">id='rowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement10.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement10.html
new file mode 100644
index 0000000000..e747e55045
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement10.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The tabIndex attribute is an index that represents the element's position
+ in the tabbing order.
+
+ Retrieve the tabIndex attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-60363303
+*/
+function HTMLTextAreaElement10() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement10") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",5,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement10</h2>
+<p>&lt;test name='HTMLTextAreaElement10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The tabIndex attribute is an index that represents the element's position
+ in the tabbing order.
+
+ Retrieve the tabIndex attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-60363303">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-60363303</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLTextAreaElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='5' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement11.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement11.html
new file mode 100644
index 0000000000..4c0f067b09
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement11.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the type of this form control.
+
+ Retrieve the type attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24874179
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLTextAreaElement-type
+*/
+function HTMLTextAreaElement11() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement11") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","textarea",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement11</h2>
+<p>&lt;test name='HTMLTextAreaElement11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the type of this form control.
+
+ Retrieve the type attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24874179">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-24874179</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLTextAreaElement-type">http://www.w3.org/TR/DOM-Level-2-HTML/html#HTML-HTMLTextAreaElement-type</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLTextAreaElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"textarea"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement12.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement12.html
new file mode 100644
index 0000000000..9f3684e80d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement12.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The value attribute represents the current contents of the corresponding
+ form control, in an interactive user agent.
+
+ Retrieve the value attribute of the 1st TEXTAREA element and examine
+ its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715579
+*/
+function HTMLTextAreaElement12() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement12") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("valueLink","TEXTAREA1",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement12</h2>
+<p>&lt;test name='HTMLTextAreaElement12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The value attribute represents the current contents of the corresponding
+ form control, in an interactive user agent.
+
+ Retrieve the value attribute of the 1st TEXTAREA element and examine
+ its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715579">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-70715579</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLTextAreaElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"TEXTAREA1"' <a id="valueLink">id='valueLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement13.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement13.html
new file mode 100644
index 0000000000..d1d32f2af1
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement13.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Calling HTMLTextAreaElement.blur should surrender input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6750689
+*/
+function HTMLTextAreaElement13() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement13") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.blur();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement13</h2>
+<p>&lt;test name='HTMLTextAreaElement13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Calling HTMLTextAreaElement.blur should surrender input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6750689">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6750689</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;blur interface='HTMLTextAreaElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement14.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement14.html
new file mode 100644
index 0000000000..548028cd66
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement14.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Calling HTMLTextAreaElement.focus should capture input focus.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39055426
+*/
+function HTMLTextAreaElement14() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement14") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.focus();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement14</h2>
+<p>&lt;test name='HTMLTextAreaElement14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Calling HTMLTextAreaElement.focus should capture input focus.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39055426">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39055426</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;focus interface='HTMLTextAreaElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement15.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement15.html
new file mode 100644
index 0000000000..879b6208ef
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTextAreaElement15.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTextAreaElement15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "textarea");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Calling HTMLTextAreaElement.select should select the text area.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48880622
+*/
+function HTMLTextAreaElement15() {
+ var success;
+ if(checkInitialization(builder, "HTMLTextAreaElement15") != null) return;
+ var nodeList;
+ var testNode;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "textarea");
+ nodeList = doc.getElementsByTagName("textarea");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(0);
+ testNode.select();
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTextAreaElement15</h2>
+<p>&lt;test name='HTMLTextAreaElement15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTextAreaElement15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Calling HTMLTextAreaElement.select should select the text area.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48880622">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48880622</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='textarea' willBeModified='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"textarea"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select interface='HTMLTextAreaElement' obj='testNode'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/textarea.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLTitleElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLTitleElement01.html
new file mode 100644
index 0000000000..f71ce5975c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLTitleElement01.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTitleElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLTitleElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "title");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The text attribute is the specified title as a string.
+
+ Retrieve the text attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77500413
+*/
+function HTMLTitleElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLTitleElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vtext;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "title");
+ nodeList = doc.getElementsByTagName("title");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtext = testNode.text;
+
+ assertEquals("textLink","NIST DOM HTML Test - TITLE",vtext);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLTitleElement01</h2>
+<p>&lt;test name='HTMLTitleElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTitleElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The text attribute is the specified title as a string.
+
+ Retrieve the text attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77500413">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77500413</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtext' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='title' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"title"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;text interface='HTMLTitleElement' obj='testNode' var='vtext'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtext' expected='"NIST DOM HTML Test - TITLE"' <a id="textLink">id='textLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/title.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement01.html b/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement01.html
new file mode 100644
index 0000000000..a3913a0e23
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement01.html
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLUListElement01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLUListElement01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "ulist");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The compact attribute specifies whether to reduce spacing between list
+ items.
+
+ Retrieve the compact attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39864178
+*/
+function HTMLUListElement01() {
+ var success;
+ if(checkInitialization(builder, "HTMLUListElement01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "ulist");
+ nodeList = doc.getElementsByTagName("ul");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLUListElement01</h2>
+<p>&lt;test name='HTMLUListElement01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLUListElement01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The compact attribute specifies whether to reduce spacing between list
+ items.
+
+ Retrieve the compact attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39864178">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39864178</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='ulist' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ul"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLUListElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/ulist.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement02.html b/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement02.html
new file mode 100644
index 0000000000..0ab6be828a
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_HTMLUListElement02.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLUListElement02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['HTMLUListElement02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "ulist");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+ The type attribute specifies the bullet style.
+
+ Retrieve the type attribute and examine its value.
+
+* @author NIST
+* @author Mary Brady
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96874670
+*/
+function HTMLUListElement02() {
+ var success;
+ if(checkInitialization(builder, "HTMLUListElement02") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "ulist");
+ nodeList = doc.getElementsByTagName("ul");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","disc",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/HTMLUListElement02</h2>
+<p>&lt;test name='HTMLUListElement02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLUListElement02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;NIST&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+ The type attribute specifies the bullet style.
+
+ Retrieve the type attribute and examine its value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Mary Brady&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-22&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96874670">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96874670</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='ulist' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"ul"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLUListElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"disc"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/ulist.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_alltests.html b/dom/tests/mochitest/dom-level2-html/test_alltests.html
new file mode 100644
index 0000000000..2ad21a3fcd
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_alltests.html
@@ -0,0 +1,3933 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/alltests</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script src="DOMTestSuite.js" type="text/javascript"></script>
+<script type="text/javascript">
+
+function suite() {
+ var newsuite = new top.jsUnitTestSuite();
+ var suiteBuilder = createConfiguredBuilder();
+ var isHTML = (suiteBuilder.contentType == "text/html") || (suiteBuilder.contentType == "application/xhtml+xml");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLAnchorElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLAppletElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLAreaElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLBRElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLBaseElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLBaseElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLBodyElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLButtonElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection01.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection02.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection03.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection04.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection05.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection06.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection07.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection08.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection09.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection10.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection11.html");
+ newsuite.addTestPage("../level2/html/HTMLCollection12.html");
+ newsuite.addTestPage("../level2/html/HTMLDirectoryElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLDivElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLDlistElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument01.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument02.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument03.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument04.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument05.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument07.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument08.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument09.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument10.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument11.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument12.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument13.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument14.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument15.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument16.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument17.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument18.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument19.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument20.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument21.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument22.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument23.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument24.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument25.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument26.html");
+ newsuite.addTestPage("../level2/html/HTMLDocument27.html");
+ newsuite.addTestPage("../level2/html/HTMLElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLElement100.html");
+ newsuite.addTestPage("../level2/html/HTMLElement101.html");
+ newsuite.addTestPage("../level2/html/HTMLElement102.html");
+ newsuite.addTestPage("../level2/html/HTMLElement103.html");
+ newsuite.addTestPage("../level2/html/HTMLElement104.html");
+ newsuite.addTestPage("../level2/html/HTMLElement105.html");
+ newsuite.addTestPage("../level2/html/HTMLElement106.html");
+ newsuite.addTestPage("../level2/html/HTMLElement107.html");
+ newsuite.addTestPage("../level2/html/HTMLElement108.html");
+ newsuite.addTestPage("../level2/html/HTMLElement109.html");
+ newsuite.addTestPage("../level2/html/HTMLElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLElement110.html");
+ newsuite.addTestPage("../level2/html/HTMLElement111.html");
+ newsuite.addTestPage("../level2/html/HTMLElement112.html");
+ newsuite.addTestPage("../level2/html/HTMLElement113.html");
+ newsuite.addTestPage("../level2/html/HTMLElement114.html");
+ newsuite.addTestPage("../level2/html/HTMLElement115.html");
+ newsuite.addTestPage("../level2/html/HTMLElement116.html");
+ newsuite.addTestPage("../level2/html/HTMLElement117.html");
+ newsuite.addTestPage("../level2/html/HTMLElement118.html");
+ newsuite.addTestPage("../level2/html/HTMLElement119.html");
+ newsuite.addTestPage("../level2/html/HTMLElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLElement120.html");
+ newsuite.addTestPage("../level2/html/HTMLElement121.html");
+ newsuite.addTestPage("../level2/html/HTMLElement122.html");
+ newsuite.addTestPage("../level2/html/HTMLElement123.html");
+ newsuite.addTestPage("../level2/html/HTMLElement124.html");
+ newsuite.addTestPage("../level2/html/HTMLElement125.html");
+ newsuite.addTestPage("../level2/html/HTMLElement126.html");
+ newsuite.addTestPage("../level2/html/HTMLElement127.html");
+ newsuite.addTestPage("../level2/html/HTMLElement128.html");
+ newsuite.addTestPage("../level2/html/HTMLElement129.html");
+ newsuite.addTestPage("../level2/html/HTMLElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLElement130.html");
+ newsuite.addTestPage("../level2/html/HTMLElement131.html");
+ newsuite.addTestPage("../level2/html/HTMLElement132.html");
+ newsuite.addTestPage("../level2/html/HTMLElement133.html");
+ newsuite.addTestPage("../level2/html/HTMLElement134.html");
+ newsuite.addTestPage("../level2/html/HTMLElement135.html");
+ newsuite.addTestPage("../level2/html/HTMLElement136.html");
+ newsuite.addTestPage("../level2/html/HTMLElement137.html");
+ newsuite.addTestPage("../level2/html/HTMLElement138.html");
+ newsuite.addTestPage("../level2/html/HTMLElement139.html");
+ newsuite.addTestPage("../level2/html/HTMLElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLElement140.html");
+ newsuite.addTestPage("../level2/html/HTMLElement141.html");
+ newsuite.addTestPage("../level2/html/HTMLElement142.html");
+ newsuite.addTestPage("../level2/html/HTMLElement143.html");
+ newsuite.addTestPage("../level2/html/HTMLElement144.html");
+ newsuite.addTestPage("../level2/html/HTMLElement145.html");
+ newsuite.addTestPage("../level2/html/HTMLElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLElement22.html");
+ newsuite.addTestPage("../level2/html/HTMLElement23.html");
+ newsuite.addTestPage("../level2/html/HTMLElement24.html");
+ newsuite.addTestPage("../level2/html/HTMLElement25.html");
+ newsuite.addTestPage("../level2/html/HTMLElement26.html");
+ newsuite.addTestPage("../level2/html/HTMLElement27.html");
+ newsuite.addTestPage("../level2/html/HTMLElement28.html");
+ newsuite.addTestPage("../level2/html/HTMLElement29.html");
+ newsuite.addTestPage("../level2/html/HTMLElement30.html");
+ newsuite.addTestPage("../level2/html/HTMLElement31.html");
+ newsuite.addTestPage("../level2/html/HTMLElement32.html");
+ newsuite.addTestPage("../level2/html/HTMLElement33.html");
+ newsuite.addTestPage("../level2/html/HTMLElement34.html");
+ newsuite.addTestPage("../level2/html/HTMLElement35.html");
+ newsuite.addTestPage("../level2/html/HTMLElement36.html");
+ newsuite.addTestPage("../level2/html/HTMLElement37.html");
+ newsuite.addTestPage("../level2/html/HTMLElement38.html");
+ newsuite.addTestPage("../level2/html/HTMLElement39.html");
+ newsuite.addTestPage("../level2/html/HTMLElement40.html");
+ newsuite.addTestPage("../level2/html/HTMLElement41.html");
+ newsuite.addTestPage("../level2/html/HTMLElement42.html");
+ newsuite.addTestPage("../level2/html/HTMLElement43.html");
+ newsuite.addTestPage("../level2/html/HTMLElement44.html");
+ newsuite.addTestPage("../level2/html/HTMLElement45.html");
+ newsuite.addTestPage("../level2/html/HTMLElement46.html");
+ newsuite.addTestPage("../level2/html/HTMLElement47.html");
+ newsuite.addTestPage("../level2/html/HTMLElement48.html");
+ newsuite.addTestPage("../level2/html/HTMLElement49.html");
+ newsuite.addTestPage("../level2/html/HTMLElement50.html");
+ newsuite.addTestPage("../level2/html/HTMLElement51.html");
+ newsuite.addTestPage("../level2/html/HTMLElement52.html");
+ newsuite.addTestPage("../level2/html/HTMLElement53.html");
+ newsuite.addTestPage("../level2/html/HTMLElement54.html");
+ newsuite.addTestPage("../level2/html/HTMLElement55.html");
+ newsuite.addTestPage("../level2/html/HTMLElement56.html");
+ newsuite.addTestPage("../level2/html/HTMLElement57.html");
+ newsuite.addTestPage("../level2/html/HTMLElement58.html");
+ newsuite.addTestPage("../level2/html/HTMLElement59.html");
+ newsuite.addTestPage("../level2/html/HTMLElement60.html");
+ newsuite.addTestPage("../level2/html/HTMLElement61.html");
+ newsuite.addTestPage("../level2/html/HTMLElement62.html");
+ newsuite.addTestPage("../level2/html/HTMLElement63.html");
+ newsuite.addTestPage("../level2/html/HTMLElement64.html");
+ newsuite.addTestPage("../level2/html/HTMLElement65.html");
+ newsuite.addTestPage("../level2/html/HTMLElement66.html");
+ newsuite.addTestPage("../level2/html/HTMLElement67.html");
+ newsuite.addTestPage("../level2/html/HTMLElement68.html");
+ newsuite.addTestPage("../level2/html/HTMLElement69.html");
+ newsuite.addTestPage("../level2/html/HTMLElement70.html");
+ newsuite.addTestPage("../level2/html/HTMLElement71.html");
+ newsuite.addTestPage("../level2/html/HTMLElement72.html");
+ newsuite.addTestPage("../level2/html/HTMLElement73.html");
+ newsuite.addTestPage("../level2/html/HTMLElement74.html");
+ newsuite.addTestPage("../level2/html/HTMLElement75.html");
+ newsuite.addTestPage("../level2/html/HTMLElement76.html");
+ newsuite.addTestPage("../level2/html/HTMLElement77.html");
+ newsuite.addTestPage("../level2/html/HTMLElement78.html");
+ newsuite.addTestPage("../level2/html/HTMLElement79.html");
+ newsuite.addTestPage("../level2/html/HTMLElement80.html");
+ newsuite.addTestPage("../level2/html/HTMLElement81.html");
+ newsuite.addTestPage("../level2/html/HTMLElement82.html");
+ newsuite.addTestPage("../level2/html/HTMLElement83.html");
+ newsuite.addTestPage("../level2/html/HTMLElement84.html");
+ newsuite.addTestPage("../level2/html/HTMLElement85.html");
+ newsuite.addTestPage("../level2/html/HTMLElement86.html");
+ newsuite.addTestPage("../level2/html/HTMLElement87.html");
+ newsuite.addTestPage("../level2/html/HTMLElement88.html");
+ newsuite.addTestPage("../level2/html/HTMLElement89.html");
+ newsuite.addTestPage("../level2/html/HTMLElement90.html");
+ newsuite.addTestPage("../level2/html/HTMLElement91.html");
+ newsuite.addTestPage("../level2/html/HTMLElement92.html");
+ newsuite.addTestPage("../level2/html/HTMLElement93.html");
+ newsuite.addTestPage("../level2/html/HTMLElement94.html");
+ newsuite.addTestPage("../level2/html/HTMLElement95.html");
+ newsuite.addTestPage("../level2/html/HTMLElement96.html");
+ newsuite.addTestPage("../level2/html/HTMLElement97.html");
+ newsuite.addTestPage("../level2/html/HTMLElement98.html");
+ newsuite.addTestPage("../level2/html/HTMLElement99.html");
+ newsuite.addTestPage("../level2/html/HTMLFieldSetElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLFieldSetElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLFontElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLFontElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLFontElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLFormElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameSetElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLFrameSetElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLHRElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLHRElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLHRElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLHRElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLHeadingElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLHtmlElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLIFrameElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLImageElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLInputElement22.html");
+ newsuite.addTestPage("../level2/html/HTMLIsIndexElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLIsIndexElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLIsIndexElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLLIElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLLIElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLLabelElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLLabelElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLLabelElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLLabelElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLLegendElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLLegendElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLLegendElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLLegendElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLLinkElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLMapElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLMapElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLMenuElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLMetaElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLMetaElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLMetaElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLMetaElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLModElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLModElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLModElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLModElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLOListElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLOListElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLOListElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLObjectElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLOptGroupElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLOptGroupElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection01.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection02.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection03.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection04.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection05.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection06.html");
+ newsuite.addTestPage("../level2/html/HTMLOptionsCollection07.html");
+ newsuite.addTestPage("../level2/html/HTMLParagraphElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLParamElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLParamElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLParamElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLParamElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLPreElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLQuoteElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLQuoteElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLScriptElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLSelectElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLStyleElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLStyleElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLStyleElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCaptionElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement22.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement23.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement24.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement25.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement26.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement27.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement28.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement29.html");
+ newsuite.addTestPage("../level2/html/HTMLTableCellElement30.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTableColElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement22.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement23.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement24.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement25.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement26.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement27.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement28.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement29.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement30.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement31.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement32.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement33.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement34.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement35.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement36.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement37.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement38.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement39.html");
+ newsuite.addTestPage("../level2/html/HTMLTableElement40.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLTableRowElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement16.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement17.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement18.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement19.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement20.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement21.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement22.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement23.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement24.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement25.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement26.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement27.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement28.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement29.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement30.html");
+ newsuite.addTestPage("../level2/html/HTMLTableSectionElement31.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement02.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement03.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement04.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement05.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement06.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement07.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement08.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement09.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement10.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement11.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement12.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement13.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement14.html");
+ newsuite.addTestPage("../level2/html/HTMLTextAreaElement15.html");
+ newsuite.addTestPage("../level2/html/HTMLTitleElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLUListElement01.html");
+ newsuite.addTestPage("../level2/html/HTMLUListElement02.html");
+ newsuite.addTestPage("../level2/html/anchor01.html");
+ newsuite.addTestPage("../level2/html/anchor02.html");
+ newsuite.addTestPage("../level2/html/anchor03.html");
+ newsuite.addTestPage("../level2/html/anchor04.html");
+ newsuite.addTestPage("../level2/html/anchor05.html");
+ newsuite.addTestPage("../level2/html/anchor06.html");
+ newsuite.addTestPage("../level2/html/area01.html");
+ newsuite.addTestPage("../level2/html/area02.html");
+ newsuite.addTestPage("../level2/html/area03.html");
+ newsuite.addTestPage("../level2/html/area04.html");
+ newsuite.addTestPage("../level2/html/body01.html");
+ newsuite.addTestPage("../level2/html/button01.html");
+ newsuite.addTestPage("../level2/html/button02.html");
+ newsuite.addTestPage("../level2/html/button03.html");
+ newsuite.addTestPage("../level2/html/button04.html");
+ newsuite.addTestPage("../level2/html/button05.html");
+ newsuite.addTestPage("../level2/html/button06.html");
+ newsuite.addTestPage("../level2/html/button07.html");
+ newsuite.addTestPage("../level2/html/button08.html");
+ newsuite.addTestPage("../level2/html/button09.html");
+ newsuite.addTestPage("../level2/html/dlist01.html");
+ newsuite.addTestPage("../level2/html/doc01.html");
+ newsuite.addTestPage("../level2/html/hasFeature01.html");
+ newsuite.addTestPage("../level2/html/hasFeature02.html");
+ newsuite.addTestPage("../level2/html/hasFeature03.html");
+ newsuite.addTestPage("../level2/html/hasFeature04.html");
+ newsuite.addTestPage("../level2/html/hasFeature05.html");
+ newsuite.addTestPage("../level2/html/hasFeature06.html");
+ newsuite.addTestPage("../level2/html/object01.html");
+ newsuite.addTestPage("../level2/html/object02.html");
+ newsuite.addTestPage("../level2/html/object03.html");
+ newsuite.addTestPage("../level2/html/object04.html");
+ newsuite.addTestPage("../level2/html/object05.html");
+ newsuite.addTestPage("../level2/html/object06.html");
+ newsuite.addTestPage("../level2/html/object07.html");
+ newsuite.addTestPage("../level2/html/object08.html");
+ newsuite.addTestPage("../level2/html/object09.html");
+ newsuite.addTestPage("../level2/html/object10.html");
+ newsuite.addTestPage("../level2/html/object11.html");
+ newsuite.addTestPage("../level2/html/object12.html");
+ newsuite.addTestPage("../level2/html/object13.html");
+ newsuite.addTestPage("../level2/html/object14.html");
+ newsuite.addTestPage("../level2/html/object15.html");
+ newsuite.addTestPage("../level2/html/table01.html");
+ newsuite.addTestPage("../level2/html/table02.html");
+ newsuite.addTestPage("../level2/html/table03.html");
+ newsuite.addTestPage("../level2/html/table04.html");
+ newsuite.addTestPage("../level2/html/table06.html");
+ newsuite.addTestPage("../level2/html/table07.html");
+ newsuite.addTestPage("../level2/html/table08.html");
+ newsuite.addTestPage("../level2/html/table09.html");
+ newsuite.addTestPage("../level2/html/table10.html");
+ newsuite.addTestPage("../level2/html/table12.html");
+ newsuite.addTestPage("../level2/html/table15.html");
+ newsuite.addTestPage("../level2/html/table17.html");
+ newsuite.addTestPage("../level2/html/table18.html");
+ newsuite.addTestPage("../level2/html/table19.html");
+ newsuite.addTestPage("../level2/html/table20.html");
+ newsuite.addTestPage("../level2/html/table21.html");
+ newsuite.addTestPage("../level2/html/table22.html");
+ newsuite.addTestPage("../level2/html/table23.html");
+ newsuite.addTestPage("../level2/html/table24.html");
+ newsuite.addTestPage("../level2/html/table25.html");
+ newsuite.addTestPage("../level2/html/table26.html");
+ newsuite.addTestPage("../level2/html/table27.html");
+ newsuite.addTestPage("../level2/html/table28.html");
+ newsuite.addTestPage("../level2/html/table29.html");
+ newsuite.addTestPage("../level2/html/table30.html");
+ newsuite.addTestPage("../level2/html/table31.html");
+ newsuite.addTestPage("../level2/html/table32.html");
+ newsuite.addTestPage("../level2/html/table33.html");
+ newsuite.addTestPage("../level2/html/table34.html");
+ newsuite.addTestPage("../level2/html/table35.html");
+ newsuite.addTestPage("../level2/html/table36.html");
+ newsuite.addTestPage("../level2/html/table37.html");
+ newsuite.addTestPage("../level2/html/table38.html");
+ newsuite.addTestPage("../level2/html/table39.html");
+ newsuite.addTestPage("../level2/html/table40.html");
+ newsuite.addTestPage("../level2/html/table41.html");
+ newsuite.addTestPage("../level2/html/table42.html");
+ newsuite.addTestPage("../level2/html/table43.html");
+ newsuite.addTestPage("../level2/html/table44.html");
+ newsuite.addTestPage("../level2/html/table45.html");
+ newsuite.addTestPage("../level2/html/table46.html");
+ newsuite.addTestPage("../level2/html/table47.html");
+ newsuite.addTestPage("../level2/html/table48.html");
+ newsuite.addTestPage("../level2/html/table49.html");
+ newsuite.addTestPage("../level2/html/table50.html");
+ newsuite.addTestPage("../level2/html/table51.html");
+ newsuite.addTestPage("../level2/html/table52.html");
+ newsuite.addTestPage("../level2/html/table53.html");
+
+ return newsuite;
+}
+</script>
+</head>
+<body onload="onImplementationChange()">
+<h1>DOM Level 2 HTML Test Suite</h1>
+<form onsubmit="fixTestPagePath()" action="../../jsunit/testRunner.html" id="configuration">
+<table summary="Configuration" border="1" width="100%">
+<tr>
+<td>
+<table summary="Tests" width="100%">
+<tr>
+<td>Test: </td><td><select size="1" name="testpage"><option value="alltests.html" selected>alltests</option><option value="anchor01.html">anchor01</option>
+
+
+
+
+<option value="anchor02.html">anchor02</option>
+
+
+
+
+<option value="anchor03.html">anchor03</option>
+
+
+
+
+<option value="anchor04.html">anchor04</option>
+
+
+
+
+<option value="anchor05.html">anchor05</option>
+
+
+
+
+<option value="anchor06.html">anchor06</option>
+
+
+
+
+<option value="area01.html">area01</option>
+
+
+
+
+<option value="area02.html">area02</option>
+
+
+
+
+<option value="area03.html">area03</option>
+
+
+
+
+<option value="area04.html">area04</option>
+
+
+
+
+<option value="body01.html">body01</option>
+
+
+
+
+<option value="button01.html">button01</option>
+
+
+
+
+<option value="button02.html">button02</option>
+
+
+
+
+<option value="button03.html">button03</option>
+
+
+
+
+<option value="button04.html">button04</option>
+
+
+
+
+<option value="button05.html">button05</option>
+
+
+
+
+<option value="button06.html">button06</option>
+
+
+
+
+<option value="button07.html">button07</option>
+
+
+
+
+<option value="button08.html">button08</option>
+
+
+
+
+<option value="button09.html">button09</option>
+
+
+
+
+<option value="dlist01.html">dlist01</option>
+
+
+
+
+<option value="doc01.html">doc01</option>
+
+
+
+
+<option value="hasFeature01.html">hasFeature01</option>
+
+
+
+
+<option value="HTMLAnchorElement01.html">HTMLAnchorElement01</option>
+
+
+
+
+<option value="HTMLAnchorElement02.html">HTMLAnchorElement02</option>
+
+
+
+
+<option value="HTMLAnchorElement03.html">HTMLAnchorElement03</option>
+
+
+
+
+<option value="HTMLAnchorElement04.html">HTMLAnchorElement04</option>
+
+
+
+
+<option value="HTMLAnchorElement05.html">HTMLAnchorElement05</option>
+
+
+
+
+<option value="HTMLAnchorElement06.html">HTMLAnchorElement06</option>
+
+
+
+
+<option value="HTMLAnchorElement07.html">HTMLAnchorElement07</option>
+
+
+
+
+<option value="HTMLAnchorElement08.html">HTMLAnchorElement08</option>
+
+
+
+
+<option value="HTMLAnchorElement09.html">HTMLAnchorElement09</option>
+
+
+
+
+<option value="HTMLAnchorElement10.html">HTMLAnchorElement10</option>
+
+
+
+
+<option value="HTMLAnchorElement11.html">HTMLAnchorElement11</option>
+
+
+
+
+<option value="HTMLAnchorElement12.html">HTMLAnchorElement12</option>
+
+
+
+
+<option value="HTMLAnchorElement13.html">HTMLAnchorElement13</option>
+
+
+
+
+<option value="HTMLAnchorElement14.html">HTMLAnchorElement14</option>
+
+
+
+
+<option value="HTMLAppletElement01.html">HTMLAppletElement01</option>
+
+
+
+
+<option value="HTMLAppletElement02.html">HTMLAppletElement02</option>
+
+
+
+
+<option value="HTMLAppletElement03.html">HTMLAppletElement03</option>
+
+
+
+
+<option value="HTMLAppletElement04.html">HTMLAppletElement04</option>
+
+
+
+
+<option value="HTMLAppletElement05.html">HTMLAppletElement05</option>
+
+
+
+
+<option value="HTMLAppletElement06.html">HTMLAppletElement06</option>
+
+
+
+
+<option value="HTMLAppletElement08.html">HTMLAppletElement08</option>
+
+
+
+
+<option value="HTMLAppletElement10.html">HTMLAppletElement10</option>
+
+
+
+
+<option value="HTMLAppletElement11.html">HTMLAppletElement11</option>
+
+
+
+
+<option value="HTMLAreaElement01.html">HTMLAreaElement01</option>
+
+
+
+
+<option value="HTMLAreaElement02.html">HTMLAreaElement02</option>
+
+
+
+
+<option value="HTMLAreaElement03.html">HTMLAreaElement03</option>
+
+
+
+
+<option value="HTMLAreaElement04.html">HTMLAreaElement04</option>
+
+
+
+
+<option value="HTMLAreaElement05.html">HTMLAreaElement05</option>
+
+
+
+
+<option value="HTMLAreaElement06.html">HTMLAreaElement06</option>
+
+
+
+
+<option value="HTMLAreaElement07.html">HTMLAreaElement07</option>
+
+
+
+
+<option value="HTMLAreaElement08.html">HTMLAreaElement08</option>
+
+
+
+
+<option value="HTMLBaseElement01.html">HTMLBaseElement01</option>
+
+
+
+
+<option value="HTMLBaseElement02.html">HTMLBaseElement02</option>
+
+
+
+
+<option value="HTMLBodyElement01.html">HTMLBodyElement01</option>
+
+
+
+
+<option value="HTMLBodyElement02.html">HTMLBodyElement02</option>
+
+
+
+
+<option value="HTMLBodyElement03.html">HTMLBodyElement03</option>
+
+
+
+
+<option value="HTMLBodyElement04.html">HTMLBodyElement04</option>
+
+
+
+
+<option value="HTMLBodyElement05.html">HTMLBodyElement05</option>
+
+
+
+
+<option value="HTMLBodyElement06.html">HTMLBodyElement06</option>
+
+
+
+
+<option value="HTMLBRElement01.html">HTMLBRElement01</option>
+
+
+
+
+<option value="HTMLButtonElement01.html">HTMLButtonElement01</option>
+
+
+
+
+<option value="HTMLButtonElement02.html">HTMLButtonElement02</option>
+
+
+
+
+<option value="HTMLButtonElement03.html">HTMLButtonElement03</option>
+
+
+
+
+<option value="HTMLButtonElement04.html">HTMLButtonElement04</option>
+
+
+
+
+<option value="HTMLButtonElement05.html">HTMLButtonElement05</option>
+
+
+
+
+<option value="HTMLButtonElement06.html">HTMLButtonElement06</option>
+
+
+
+
+<option value="HTMLButtonElement07.html">HTMLButtonElement07</option>
+
+
+
+
+<option value="HTMLButtonElement08.html">HTMLButtonElement08</option>
+
+
+
+
+<option value="HTMLCollection01.html">HTMLCollection01</option>
+
+
+
+
+<option value="HTMLCollection02.html">HTMLCollection02</option>
+
+
+
+
+<option value="HTMLCollection03.html">HTMLCollection03</option>
+
+
+
+
+<option value="HTMLCollection04.html">HTMLCollection04</option>
+
+
+
+
+<option value="HTMLCollection05.html">HTMLCollection05</option>
+
+
+
+
+<option value="HTMLCollection06.html">HTMLCollection06</option>
+
+
+
+
+<option value="HTMLCollection07.html">HTMLCollection07</option>
+
+
+
+
+<option value="HTMLCollection08.html">HTMLCollection08</option>
+
+
+
+
+<option value="HTMLCollection09.html">HTMLCollection09</option>
+
+
+
+
+<option value="HTMLCollection10.html">HTMLCollection10</option>
+
+
+
+
+<option value="HTMLCollection11.html">HTMLCollection11</option>
+
+
+
+
+<option value="HTMLCollection12.html">HTMLCollection12</option>
+
+
+
+
+<option value="HTMLDirectoryElement01.html">HTMLDirectoryElement01</option>
+
+
+
+
+<option value="HTMLDivElement01.html">HTMLDivElement01</option>
+
+
+
+
+<option value="HTMLDlistElement01.html">HTMLDlistElement01</option>
+
+
+
+
+<option value="HTMLDocument01.html">HTMLDocument01</option>
+
+
+
+
+<option value="HTMLDocument02.html">HTMLDocument02</option>
+
+
+
+
+<option value="HTMLDocument03.html">HTMLDocument03</option>
+
+
+
+
+<option value="HTMLDocument04.html">HTMLDocument04</option>
+
+
+
+
+<option value="HTMLDocument05.html">HTMLDocument05</option>
+
+
+
+
+<option value="HTMLDocument07.html">HTMLDocument07</option>
+
+
+
+
+<option value="HTMLDocument08.html">HTMLDocument08</option>
+
+
+
+
+<option value="HTMLDocument09.html">HTMLDocument09</option>
+
+
+
+
+<option value="HTMLDocument10.html">HTMLDocument10</option>
+
+
+
+
+<option value="HTMLDocument11.html">HTMLDocument11</option>
+
+
+
+
+<option value="HTMLDocument12.html">HTMLDocument12</option>
+
+
+
+
+<option value="HTMLDocument13.html">HTMLDocument13</option>
+
+
+
+
+<option value="HTMLDocument14.html">HTMLDocument14</option>
+
+
+
+
+<option value="HTMLDocument15.html">HTMLDocument15</option>
+
+
+
+
+<option value="HTMLDocument16.html">HTMLDocument16</option>
+
+
+
+
+<option value="HTMLDocument17.html">HTMLDocument17</option>
+
+
+
+
+<option value="HTMLDocument18.html">HTMLDocument18</option>
+
+
+
+
+<option value="HTMLDocument19.html">HTMLDocument19</option>
+
+
+
+
+<option value="HTMLDocument20.html">HTMLDocument20</option>
+
+
+
+
+<option value="HTMLDocument21.html">HTMLDocument21</option>
+
+
+
+
+<option value="HTMLElement01.html">HTMLElement01</option>
+
+
+
+
+<option value="HTMLElement02.html">HTMLElement02</option>
+
+
+
+
+<option value="HTMLElement03.html">HTMLElement03</option>
+
+
+
+
+<option value="HTMLElement04.html">HTMLElement04</option>
+
+
+
+
+<option value="HTMLElement05.html">HTMLElement05</option>
+
+
+
+
+<option value="HTMLElement06.html">HTMLElement06</option>
+
+
+
+
+<option value="HTMLElement07.html">HTMLElement07</option>
+
+
+
+
+<option value="HTMLElement08.html">HTMLElement08</option>
+
+
+
+
+<option value="HTMLElement09.html">HTMLElement09</option>
+
+
+
+
+<option value="HTMLElement10.html">HTMLElement10</option>
+
+
+
+
+<option value="HTMLElement100.html">HTMLElement100</option>
+
+
+
+
+<option value="HTMLElement101.html">HTMLElement101</option>
+
+
+
+
+<option value="HTMLElement102.html">HTMLElement102</option>
+
+
+
+
+<option value="HTMLElement103.html">HTMLElement103</option>
+
+
+
+
+<option value="HTMLElement104.html">HTMLElement104</option>
+
+
+
+
+<option value="HTMLElement105.html">HTMLElement105</option>
+
+
+
+
+<option value="HTMLElement106.html">HTMLElement106</option>
+
+
+
+
+<option value="HTMLElement107.html">HTMLElement107</option>
+
+
+
+
+<option value="HTMLElement108.html">HTMLElement108</option>
+
+
+
+
+<option value="HTMLElement109.html">HTMLElement109</option>
+
+
+
+
+<option value="HTMLElement11.html">HTMLElement11</option>
+
+
+
+
+<option value="HTMLElement110.html">HTMLElement110</option>
+
+
+
+
+<option value="HTMLElement111.html">HTMLElement111</option>
+
+
+
+
+<option value="HTMLElement112.html">HTMLElement112</option>
+
+
+
+
+<option value="HTMLElement113.html">HTMLElement113</option>
+
+
+
+
+<option value="HTMLElement114.html">HTMLElement114</option>
+
+
+
+
+<option value="HTMLElement115.html">HTMLElement115</option>
+
+
+
+
+<option value="HTMLElement116.html">HTMLElement116</option>
+
+
+
+
+<option value="HTMLElement117.html">HTMLElement117</option>
+
+
+
+
+<option value="HTMLElement118.html">HTMLElement118</option>
+
+
+
+
+<option value="HTMLElement119.html">HTMLElement119</option>
+
+
+
+
+<option value="HTMLElement12.html">HTMLElement12</option>
+
+
+
+
+<option value="HTMLElement120.html">HTMLElement120</option>
+
+
+
+
+<option value="HTMLElement121.html">HTMLElement121</option>
+
+
+
+
+<option value="HTMLElement122.html">HTMLElement122</option>
+
+
+
+
+<option value="HTMLElement123.html">HTMLElement123</option>
+
+
+
+
+<option value="HTMLElement124.html">HTMLElement124</option>
+
+
+
+
+<option value="HTMLElement125.html">HTMLElement125</option>
+
+
+
+
+<option value="HTMLElement126.html">HTMLElement126</option>
+
+
+
+
+<option value="HTMLElement127.html">HTMLElement127</option>
+
+
+
+
+<option value="HTMLElement128.html">HTMLElement128</option>
+
+
+
+
+<option value="HTMLElement129.html">HTMLElement129</option>
+
+
+
+
+<option value="HTMLElement13.html">HTMLElement13</option>
+
+
+
+
+<option value="HTMLElement130.html">HTMLElement130</option>
+
+
+
+
+<option value="HTMLElement131.html">HTMLElement131</option>
+
+
+
+
+<option value="HTMLElement132.html">HTMLElement132</option>
+
+
+
+
+<option value="HTMLElement133.html">HTMLElement133</option>
+
+
+
+
+<option value="HTMLElement134.html">HTMLElement134</option>
+
+
+
+
+<option value="HTMLElement135.html">HTMLElement135</option>
+
+
+
+
+<option value="HTMLElement136.html">HTMLElement136</option>
+
+
+
+
+<option value="HTMLElement137.html">HTMLElement137</option>
+
+
+
+
+<option value="HTMLElement138.html">HTMLElement138</option>
+
+
+
+
+<option value="HTMLElement139.html">HTMLElement139</option>
+
+
+
+
+<option value="HTMLElement14.html">HTMLElement14</option>
+
+
+
+
+<option value="HTMLElement140.html">HTMLElement140</option>
+
+
+
+
+<option value="HTMLElement141.html">HTMLElement141</option>
+
+
+
+
+<option value="HTMLElement142.html">HTMLElement142</option>
+
+
+
+
+<option value="HTMLElement143.html">HTMLElement143</option>
+
+
+
+
+<option value="HTMLElement144.html">HTMLElement144</option>
+
+
+
+
+<option value="HTMLElement145.html">HTMLElement145</option>
+
+
+
+
+<option value="HTMLElement15.html">HTMLElement15</option>
+
+
+
+
+<option value="HTMLElement16.html">HTMLElement16</option>
+
+
+
+
+<option value="HTMLElement17.html">HTMLElement17</option>
+
+
+
+
+<option value="HTMLElement18.html">HTMLElement18</option>
+
+
+
+
+<option value="HTMLElement19.html">HTMLElement19</option>
+
+
+
+
+<option value="HTMLElement20.html">HTMLElement20</option>
+
+
+
+
+<option value="HTMLElement21.html">HTMLElement21</option>
+
+
+
+
+<option value="HTMLElement22.html">HTMLElement22</option>
+
+
+
+
+<option value="HTMLElement23.html">HTMLElement23</option>
+
+
+
+
+<option value="HTMLElement24.html">HTMLElement24</option>
+
+
+
+
+<option value="HTMLElement25.html">HTMLElement25</option>
+
+
+
+
+<option value="HTMLElement26.html">HTMLElement26</option>
+
+
+
+
+<option value="HTMLElement27.html">HTMLElement27</option>
+
+
+
+
+<option value="HTMLElement28.html">HTMLElement28</option>
+
+
+
+
+<option value="HTMLElement29.html">HTMLElement29</option>
+
+
+
+
+<option value="HTMLElement30.html">HTMLElement30</option>
+
+
+
+
+<option value="HTMLElement31.html">HTMLElement31</option>
+
+
+
+
+<option value="HTMLElement32.html">HTMLElement32</option>
+
+
+
+
+<option value="HTMLElement33.html">HTMLElement33</option>
+
+
+
+
+<option value="HTMLElement34.html">HTMLElement34</option>
+
+
+
+
+<option value="HTMLElement35.html">HTMLElement35</option>
+
+
+
+
+<option value="HTMLElement36.html">HTMLElement36</option>
+
+
+
+
+<option value="HTMLElement37.html">HTMLElement37</option>
+
+
+
+
+<option value="HTMLElement38.html">HTMLElement38</option>
+
+
+
+
+<option value="HTMLElement39.html">HTMLElement39</option>
+
+
+
+
+<option value="HTMLElement40.html">HTMLElement40</option>
+
+
+
+
+<option value="HTMLElement41.html">HTMLElement41</option>
+
+
+
+
+<option value="HTMLElement42.html">HTMLElement42</option>
+
+
+
+
+<option value="HTMLElement43.html">HTMLElement43</option>
+
+
+
+
+<option value="HTMLElement44.html">HTMLElement44</option>
+
+
+
+
+<option value="HTMLElement45.html">HTMLElement45</option>
+
+
+
+
+<option value="HTMLElement46.html">HTMLElement46</option>
+
+
+
+
+<option value="HTMLElement47.html">HTMLElement47</option>
+
+
+
+
+<option value="HTMLElement48.html">HTMLElement48</option>
+
+
+
+
+<option value="HTMLElement49.html">HTMLElement49</option>
+
+
+
+
+<option value="HTMLElement50.html">HTMLElement50</option>
+
+
+
+
+<option value="HTMLElement51.html">HTMLElement51</option>
+
+
+
+
+<option value="HTMLElement52.html">HTMLElement52</option>
+
+
+
+
+<option value="HTMLElement53.html">HTMLElement53</option>
+
+
+
+
+<option value="HTMLElement54.html">HTMLElement54</option>
+
+
+
+
+<option value="HTMLElement55.html">HTMLElement55</option>
+
+
+
+
+<option value="HTMLElement56.html">HTMLElement56</option>
+
+
+
+
+<option value="HTMLElement57.html">HTMLElement57</option>
+
+
+
+
+<option value="HTMLElement58.html">HTMLElement58</option>
+
+
+
+
+<option value="HTMLElement59.html">HTMLElement59</option>
+
+
+
+
+<option value="HTMLElement60.html">HTMLElement60</option>
+
+
+
+
+<option value="HTMLElement61.html">HTMLElement61</option>
+
+
+
+
+<option value="HTMLElement62.html">HTMLElement62</option>
+
+
+
+
+<option value="HTMLElement63.html">HTMLElement63</option>
+
+
+
+
+<option value="HTMLElement64.html">HTMLElement64</option>
+
+
+
+
+<option value="HTMLElement65.html">HTMLElement65</option>
+
+
+
+
+<option value="HTMLElement66.html">HTMLElement66</option>
+
+
+
+
+<option value="HTMLElement67.html">HTMLElement67</option>
+
+
+
+
+<option value="HTMLElement68.html">HTMLElement68</option>
+
+
+
+
+<option value="HTMLElement69.html">HTMLElement69</option>
+
+
+
+
+<option value="HTMLElement70.html">HTMLElement70</option>
+
+
+
+
+<option value="HTMLElement71.html">HTMLElement71</option>
+
+
+
+
+<option value="HTMLElement72.html">HTMLElement72</option>
+
+
+
+
+<option value="HTMLElement73.html">HTMLElement73</option>
+
+
+
+
+<option value="HTMLElement74.html">HTMLElement74</option>
+
+
+
+
+<option value="HTMLElement75.html">HTMLElement75</option>
+
+
+
+
+<option value="HTMLElement76.html">HTMLElement76</option>
+
+
+
+
+<option value="HTMLElement77.html">HTMLElement77</option>
+
+
+
+
+<option value="HTMLElement78.html">HTMLElement78</option>
+
+
+
+
+<option value="HTMLElement79.html">HTMLElement79</option>
+
+
+
+
+<option value="HTMLElement80.html">HTMLElement80</option>
+
+
+
+
+<option value="HTMLElement81.html">HTMLElement81</option>
+
+
+
+
+<option value="HTMLElement82.html">HTMLElement82</option>
+
+
+
+
+<option value="HTMLElement83.html">HTMLElement83</option>
+
+
+
+
+<option value="HTMLElement84.html">HTMLElement84</option>
+
+
+
+
+<option value="HTMLElement85.html">HTMLElement85</option>
+
+
+
+
+<option value="HTMLElement86.html">HTMLElement86</option>
+
+
+
+
+<option value="HTMLElement87.html">HTMLElement87</option>
+
+
+
+
+<option value="HTMLElement88.html">HTMLElement88</option>
+
+
+
+
+<option value="HTMLElement89.html">HTMLElement89</option>
+
+
+
+
+<option value="HTMLElement90.html">HTMLElement90</option>
+
+
+
+
+<option value="HTMLElement91.html">HTMLElement91</option>
+
+
+
+
+<option value="HTMLElement92.html">HTMLElement92</option>
+
+
+
+
+<option value="HTMLElement93.html">HTMLElement93</option>
+
+
+
+
+<option value="HTMLElement94.html">HTMLElement94</option>
+
+
+
+
+<option value="HTMLElement95.html">HTMLElement95</option>
+
+
+
+
+<option value="HTMLElement96.html">HTMLElement96</option>
+
+
+
+
+<option value="HTMLElement97.html">HTMLElement97</option>
+
+
+
+
+<option value="HTMLElement98.html">HTMLElement98</option>
+
+
+
+
+<option value="HTMLElement99.html">HTMLElement99</option>
+
+
+
+
+<option value="HTMLFieldSetElement01.html">HTMLFieldSetElement01</option>
+
+
+
+
+<option value="HTMLFieldSetElement02.html">HTMLFieldSetElement02</option>
+
+
+
+
+<option value="HTMLFontElement01.html">HTMLFontElement01</option>
+
+
+
+
+<option value="HTMLFontElement02.html">HTMLFontElement02</option>
+
+
+
+
+<option value="HTMLFontElement03.html">HTMLFontElement03</option>
+
+
+
+
+<option value="HTMLFormElement01.html">HTMLFormElement01</option>
+
+
+
+
+<option value="HTMLFormElement02.html">HTMLFormElement02</option>
+
+
+
+
+<option value="HTMLFormElement03.html">HTMLFormElement03</option>
+
+
+
+
+<option value="HTMLFormElement04.html">HTMLFormElement04</option>
+
+
+
+
+<option value="HTMLFormElement05.html">HTMLFormElement05</option>
+
+
+
+
+<option value="HTMLFormElement06.html">HTMLFormElement06</option>
+
+
+
+
+<option value="HTMLFormElement07.html">HTMLFormElement07</option>
+
+
+
+
+<option value="HTMLFormElement08.html">HTMLFormElement08</option>
+
+
+
+
+<option value="HTMLFormElement09.html">HTMLFormElement09</option>
+
+
+
+
+<option value="HTMLFormElement10.html">HTMLFormElement10</option>
+
+
+
+
+<option value="HTMLFrameElement01.html">HTMLFrameElement01</option>
+
+
+
+
+<option value="HTMLFrameElement02.html">HTMLFrameElement02</option>
+
+
+
+
+<option value="HTMLFrameElement03.html">HTMLFrameElement03</option>
+
+
+
+
+<option value="HTMLFrameElement04.html">HTMLFrameElement04</option>
+
+
+
+
+<option value="HTMLFrameElement05.html">HTMLFrameElement05</option>
+
+
+
+
+<option value="HTMLFrameElement06.html">HTMLFrameElement06</option>
+
+
+
+
+<option value="HTMLFrameElement07.html">HTMLFrameElement07</option>
+
+
+
+
+<option value="HTMLFrameElement08.html">HTMLFrameElement08</option>
+
+
+
+
+<option value="HTMLFrameSetElement01.html">HTMLFrameSetElement01</option>
+
+
+
+
+<option value="HTMLFrameSetElement02.html">HTMLFrameSetElement02</option>
+
+
+
+
+<option value="HTMLHeadElement01.html">HTMLHeadElement01</option>
+
+
+
+
+<option value="HTMLHeadingElement01.html">HTMLHeadingElement01</option>
+
+
+
+
+<option value="HTMLHeadingElement02.html">HTMLHeadingElement02</option>
+
+
+
+
+<option value="HTMLHeadingElement03.html">HTMLHeadingElement03</option>
+
+
+
+
+<option value="HTMLHeadingElement04.html">HTMLHeadingElement04</option>
+
+
+
+
+<option value="HTMLHeadingElement05.html">HTMLHeadingElement05</option>
+
+
+
+
+<option value="HTMLHeadingElement06.html">HTMLHeadingElement06</option>
+
+
+
+
+<option value="HTMLHRElement01.html">HTMLHRElement01</option>
+
+
+
+
+<option value="HTMLHRElement02.html">HTMLHRElement02</option>
+
+
+
+
+<option value="HTMLHRElement03.html">HTMLHRElement03</option>
+
+
+
+
+<option value="HTMLHRElement04.html">HTMLHRElement04</option>
+
+
+
+
+<option value="HTMLHtmlElement01.html">HTMLHtmlElement01</option>
+
+
+
+
+<option value="HTMLIFrameElement01.html">HTMLIFrameElement01</option>
+
+
+
+
+<option value="HTMLIFrameElement02.html">HTMLIFrameElement02</option>
+
+
+
+
+<option value="HTMLIFrameElement03.html">HTMLIFrameElement03</option>
+
+
+
+
+<option value="HTMLIFrameElement04.html">HTMLIFrameElement04</option>
+
+
+
+
+<option value="HTMLIFrameElement05.html">HTMLIFrameElement05</option>
+
+
+
+
+<option value="HTMLIFrameElement06.html">HTMLIFrameElement06</option>
+
+
+
+
+<option value="HTMLIFrameElement07.html">HTMLIFrameElement07</option>
+
+
+
+
+<option value="HTMLIFrameElement08.html">HTMLIFrameElement08</option>
+
+
+
+
+<option value="HTMLIFrameElement09.html">HTMLIFrameElement09</option>
+
+
+
+
+<option value="HTMLIFrameElement10.html">HTMLIFrameElement10</option>
+
+
+
+
+<option value="HTMLImageElement01.html">HTMLImageElement01</option>
+
+
+
+
+<option value="HTMLImageElement02.html">HTMLImageElement02</option>
+
+
+
+
+<option value="HTMLImageElement03.html">HTMLImageElement03</option>
+
+
+
+
+<option value="HTMLImageElement04.html">HTMLImageElement04</option>
+
+
+
+
+<option value="HTMLImageElement07.html">HTMLImageElement07</option>
+
+
+
+
+<option value="HTMLImageElement08.html">HTMLImageElement08</option>
+
+
+
+
+<option value="HTMLImageElement09.html">HTMLImageElement09</option>
+
+
+
+
+<option value="HTMLImageElement10.html">HTMLImageElement10</option>
+
+
+
+
+<option value="HTMLInputElement01.html">HTMLInputElement01</option>
+
+
+
+
+<option value="HTMLInputElement02.html">HTMLInputElement02</option>
+
+
+
+
+<option value="HTMLInputElement03.html">HTMLInputElement03</option>
+
+
+
+
+<option value="HTMLInputElement04.html">HTMLInputElement04</option>
+
+
+
+
+<option value="HTMLInputElement05.html">HTMLInputElement05</option>
+
+
+
+
+<option value="HTMLInputElement06.html">HTMLInputElement06</option>
+
+
+
+
+<option value="HTMLInputElement07.html">HTMLInputElement07</option>
+
+
+
+
+<option value="HTMLInputElement08.html">HTMLInputElement08</option>
+
+
+
+
+<option value="HTMLInputElement09.html">HTMLInputElement09</option>
+
+
+
+
+<option value="HTMLInputElement10.html">HTMLInputElement10</option>
+
+
+
+
+<option value="HTMLInputElement11.html">HTMLInputElement11</option>
+
+
+
+
+<option value="HTMLInputElement12.html">HTMLInputElement12</option>
+
+
+
+
+<option value="HTMLInputElement14.html">HTMLInputElement14</option>
+
+
+
+
+<option value="HTMLInputElement15.html">HTMLInputElement15</option>
+
+
+
+
+<option value="HTMLInputElement16.html">HTMLInputElement16</option>
+
+
+
+
+<option value="HTMLInputElement17.html">HTMLInputElement17</option>
+
+
+
+
+<option value="HTMLInputElement18.html">HTMLInputElement18</option>
+
+
+
+
+<option value="HTMLInputElement19.html">HTMLInputElement19</option>
+
+
+
+
+<option value="HTMLInputElement20.html">HTMLInputElement20</option>
+
+
+
+
+<option value="HTMLInputElement21.html">HTMLInputElement21</option>
+
+
+
+
+<option value="HTMLInputElement22.html">HTMLInputElement22</option>
+
+
+
+
+<option value="HTMLIsIndexElement01.html">HTMLIsIndexElement01</option>
+
+
+
+
+<option value="HTMLIsIndexElement02.html">HTMLIsIndexElement02</option>
+
+
+
+
+<option value="HTMLIsIndexElement03.html">HTMLIsIndexElement03</option>
+
+
+
+
+<option value="HTMLLabelElement01.html">HTMLLabelElement01</option>
+
+
+
+
+<option value="HTMLLabelElement02.html">HTMLLabelElement02</option>
+
+
+
+
+<option value="HTMLLabelElement03.html">HTMLLabelElement03</option>
+
+
+
+
+<option value="HTMLLabelElement04.html">HTMLLabelElement04</option>
+
+
+
+
+<option value="HTMLLegendElement01.html">HTMLLegendElement01</option>
+
+
+
+
+<option value="HTMLLegendElement02.html">HTMLLegendElement02</option>
+
+
+
+
+<option value="HTMLLegendElement03.html">HTMLLegendElement03</option>
+
+
+
+
+<option value="HTMLLegendElement04.html">HTMLLegendElement04</option>
+
+
+
+
+<option value="HTMLLIElement01.html">HTMLLIElement01</option>
+
+
+
+
+<option value="HTMLLIElement02.html">HTMLLIElement02</option>
+
+
+
+
+<option value="HTMLLinkElement01.html">HTMLLinkElement01</option>
+
+
+
+
+<option value="HTMLLinkElement02.html">HTMLLinkElement02</option>
+
+
+
+
+<option value="HTMLLinkElement03.html">HTMLLinkElement03</option>
+
+
+
+
+<option value="HTMLLinkElement04.html">HTMLLinkElement04</option>
+
+
+
+
+<option value="HTMLLinkElement05.html">HTMLLinkElement05</option>
+
+
+
+
+<option value="HTMLLinkElement06.html">HTMLLinkElement06</option>
+
+
+
+
+<option value="HTMLLinkElement07.html">HTMLLinkElement07</option>
+
+
+
+
+<option value="HTMLLinkElement08.html">HTMLLinkElement08</option>
+
+
+
+
+<option value="HTMLLinkElement09.html">HTMLLinkElement09</option>
+
+
+
+
+<option value="HTMLMapElement01.html">HTMLMapElement01</option>
+
+
+
+
+<option value="HTMLMapElement02.html">HTMLMapElement02</option>
+
+
+
+
+<option value="HTMLMenuElement01.html">HTMLMenuElement01</option>
+
+
+
+
+<option value="HTMLMetaElement01.html">HTMLMetaElement01</option>
+
+
+
+
+<option value="HTMLMetaElement02.html">HTMLMetaElement02</option>
+
+
+
+
+<option value="HTMLMetaElement03.html">HTMLMetaElement03</option>
+
+
+
+
+<option value="HTMLMetaElement04.html">HTMLMetaElement04</option>
+
+
+
+
+<option value="HTMLModElement01.html">HTMLModElement01</option>
+
+
+
+
+<option value="HTMLModElement02.html">HTMLModElement02</option>
+
+
+
+
+<option value="HTMLModElement03.html">HTMLModElement03</option>
+
+
+
+
+<option value="HTMLModElement04.html">HTMLModElement04</option>
+
+
+
+
+<option value="HTMLObjectElement01.html">HTMLObjectElement01</option>
+
+
+
+
+<option value="HTMLObjectElement02.html">HTMLObjectElement02</option>
+
+
+
+
+<option value="HTMLObjectElement03.html">HTMLObjectElement03</option>
+
+
+
+
+<option value="HTMLObjectElement04.html">HTMLObjectElement04</option>
+
+
+
+
+<option value="HTMLObjectElement05.html">HTMLObjectElement05</option>
+
+
+
+
+<option value="HTMLObjectElement06.html">HTMLObjectElement06</option>
+
+
+
+
+<option value="HTMLObjectElement07.html">HTMLObjectElement07</option>
+
+
+
+
+<option value="HTMLObjectElement08.html">HTMLObjectElement08</option>
+
+
+
+
+<option value="HTMLObjectElement09.html">HTMLObjectElement09</option>
+
+
+
+
+<option value="HTMLObjectElement10.html">HTMLObjectElement10</option>
+
+
+
+
+<option value="HTMLObjectElement12.html">HTMLObjectElement12</option>
+
+
+
+
+<option value="HTMLObjectElement13.html">HTMLObjectElement13</option>
+
+
+
+
+<option value="HTMLObjectElement14.html">HTMLObjectElement14</option>
+
+
+
+
+<option value="HTMLObjectElement15.html">HTMLObjectElement15</option>
+
+
+
+
+<option value="HTMLObjectElement17.html">HTMLObjectElement17</option>
+
+
+
+
+<option value="HTMLObjectElement18.html">HTMLObjectElement18</option>
+
+
+
+
+<option value="HTMLObjectElement19.html">HTMLObjectElement19</option>
+
+
+
+
+<option value="HTMLOListElement01.html">HTMLOListElement01</option>
+
+
+
+
+<option value="HTMLOListElement02.html">HTMLOListElement02</option>
+
+
+
+
+<option value="HTMLOListElement03.html">HTMLOListElement03</option>
+
+
+
+
+<option value="HTMLOptGroupElement01.html">HTMLOptGroupElement01</option>
+
+
+
+
+<option value="HTMLOptGroupElement02.html">HTMLOptGroupElement02</option>
+
+
+
+
+<option value="HTMLOptionElement01.html">HTMLOptionElement01</option>
+
+
+
+
+<option value="HTMLOptionElement02.html">HTMLOptionElement02</option>
+
+
+
+
+<option value="HTMLOptionElement03.html">HTMLOptionElement03</option>
+
+
+
+
+<option value="HTMLOptionElement04.html">HTMLOptionElement04</option>
+
+
+
+
+<option value="HTMLOptionElement05.html">HTMLOptionElement05</option>
+
+
+
+
+<option value="HTMLOptionElement06.html">HTMLOptionElement06</option>
+
+
+
+
+<option value="HTMLOptionElement07.html">HTMLOptionElement07</option>
+
+
+
+
+<option value="HTMLOptionElement08.html">HTMLOptionElement08</option>
+
+
+
+
+<option value="HTMLOptionElement09.html">HTMLOptionElement09</option>
+
+
+
+
+<option value="HTMLParagraphElement01.html">HTMLParagraphElement01</option>
+
+
+
+
+<option value="HTMLParamElement01.html">HTMLParamElement01</option>
+
+
+
+
+<option value="HTMLParamElement02.html">HTMLParamElement02</option>
+
+
+
+
+<option value="HTMLParamElement03.html">HTMLParamElement03</option>
+
+
+
+
+<option value="HTMLParamElement04.html">HTMLParamElement04</option>
+
+
+
+
+<option value="HTMLPreElement01.html">HTMLPreElement01</option>
+
+
+
+
+<option value="HTMLQuoteElement01.html">HTMLQuoteElement01</option>
+
+
+
+
+<option value="HTMLQuoteElement02.html">HTMLQuoteElement02</option>
+
+
+
+
+<option value="HTMLScriptElement01.html">HTMLScriptElement01</option>
+
+
+
+
+<option value="HTMLScriptElement02.html">HTMLScriptElement02</option>
+
+
+
+
+<option value="HTMLScriptElement03.html">HTMLScriptElement03</option>
+
+
+
+
+<option value="HTMLScriptElement04.html">HTMLScriptElement04</option>
+
+
+
+
+<option value="HTMLScriptElement05.html">HTMLScriptElement05</option>
+
+
+
+
+<option value="HTMLScriptElement06.html">HTMLScriptElement06</option>
+
+
+
+
+<option value="HTMLScriptElement07.html">HTMLScriptElement07</option>
+
+
+
+
+<option value="HTMLSelectElement01.html">HTMLSelectElement01</option>
+
+
+
+
+<option value="HTMLSelectElement02.html">HTMLSelectElement02</option>
+
+
+
+
+<option value="HTMLSelectElement03.html">HTMLSelectElement03</option>
+
+
+
+
+<option value="HTMLSelectElement04.html">HTMLSelectElement04</option>
+
+
+
+
+<option value="HTMLSelectElement05.html">HTMLSelectElement05</option>
+
+
+
+
+<option value="HTMLSelectElement06.html">HTMLSelectElement06</option>
+
+
+
+
+<option value="HTMLSelectElement07.html">HTMLSelectElement07</option>
+
+
+
+
+<option value="HTMLSelectElement08.html">HTMLSelectElement08</option>
+
+
+
+
+<option value="HTMLSelectElement09.html">HTMLSelectElement09</option>
+
+
+
+
+<option value="HTMLSelectElement10.html">HTMLSelectElement10</option>
+
+
+
+
+<option value="HTMLSelectElement11.html">HTMLSelectElement11</option>
+
+
+
+
+<option value="HTMLSelectElement12.html">HTMLSelectElement12</option>
+
+
+
+
+<option value="HTMLSelectElement13.html">HTMLSelectElement13</option>
+
+
+
+
+<option value="HTMLSelectElement14.html">HTMLSelectElement14</option>
+
+
+
+
+<option value="HTMLSelectElement15.html">HTMLSelectElement15</option>
+
+
+
+
+<option value="HTMLSelectElement16.html">HTMLSelectElement16</option>
+
+
+
+
+<option value="HTMLSelectElement17.html">HTMLSelectElement17</option>
+
+
+
+
+<option value="HTMLSelectElement18.html">HTMLSelectElement18</option>
+
+
+
+
+<option value="HTMLSelectElement19.html">HTMLSelectElement19</option>
+
+
+
+
+<option value="HTMLStyleElement01.html">HTMLStyleElement01</option>
+
+
+
+
+<option value="HTMLStyleElement02.html">HTMLStyleElement02</option>
+
+
+
+
+<option value="HTMLStyleElement03.html">HTMLStyleElement03</option>
+
+
+
+
+<option value="HTMLTableCaptionElement01.html">HTMLTableCaptionElement01</option>
+
+
+
+
+<option value="HTMLTableCellElement01.html">HTMLTableCellElement01</option>
+
+
+
+
+<option value="HTMLTableCellElement02.html">HTMLTableCellElement02</option>
+
+
+
+
+<option value="HTMLTableCellElement03.html">HTMLTableCellElement03</option>
+
+
+
+
+<option value="HTMLTableCellElement04.html">HTMLTableCellElement04</option>
+
+
+
+
+<option value="HTMLTableCellElement05.html">HTMLTableCellElement05</option>
+
+
+
+
+<option value="HTMLTableCellElement06.html">HTMLTableCellElement06</option>
+
+
+
+
+<option value="HTMLTableCellElement07.html">HTMLTableCellElement07</option>
+
+
+
+
+<option value="HTMLTableCellElement08.html">HTMLTableCellElement08</option>
+
+
+
+
+<option value="HTMLTableCellElement09.html">HTMLTableCellElement09</option>
+
+
+
+
+<option value="HTMLTableCellElement10.html">HTMLTableCellElement10</option>
+
+
+
+
+<option value="HTMLTableCellElement11.html">HTMLTableCellElement11</option>
+
+
+
+
+<option value="HTMLTableCellElement12.html">HTMLTableCellElement12</option>
+
+
+
+
+<option value="HTMLTableCellElement13.html">HTMLTableCellElement13</option>
+
+
+
+
+<option value="HTMLTableCellElement14.html">HTMLTableCellElement14</option>
+
+
+
+
+<option value="HTMLTableCellElement15.html">HTMLTableCellElement15</option>
+
+
+
+
+<option value="HTMLTableCellElement16.html">HTMLTableCellElement16</option>
+
+
+
+
+<option value="HTMLTableCellElement17.html">HTMLTableCellElement17</option>
+
+
+
+
+<option value="HTMLTableCellElement18.html">HTMLTableCellElement18</option>
+
+
+
+
+<option value="HTMLTableCellElement19.html">HTMLTableCellElement19</option>
+
+
+
+
+<option value="HTMLTableCellElement20.html">HTMLTableCellElement20</option>
+
+
+
+
+<option value="HTMLTableCellElement21.html">HTMLTableCellElement21</option>
+
+
+
+
+<option value="HTMLTableCellElement22.html">HTMLTableCellElement22</option>
+
+
+
+
+<option value="HTMLTableCellElement23.html">HTMLTableCellElement23</option>
+
+
+
+
+<option value="HTMLTableCellElement24.html">HTMLTableCellElement24</option>
+
+
+
+
+<option value="HTMLTableCellElement25.html">HTMLTableCellElement25</option>
+
+
+
+
+<option value="HTMLTableCellElement26.html">HTMLTableCellElement26</option>
+
+
+
+
+<option value="HTMLTableCellElement27.html">HTMLTableCellElement27</option>
+
+
+
+
+<option value="HTMLTableCellElement28.html">HTMLTableCellElement28</option>
+
+
+
+
+<option value="HTMLTableCellElement29.html">HTMLTableCellElement29</option>
+
+
+
+
+<option value="HTMLTableCellElement30.html">HTMLTableCellElement30</option>
+
+
+
+
+<option value="HTMLTableColElement01.html">HTMLTableColElement01</option>
+
+
+
+
+<option value="HTMLTableColElement02.html">HTMLTableColElement02</option>
+
+
+
+
+<option value="HTMLTableColElement03.html">HTMLTableColElement03</option>
+
+
+
+
+<option value="HTMLTableColElement04.html">HTMLTableColElement04</option>
+
+
+
+
+<option value="HTMLTableColElement05.html">HTMLTableColElement05</option>
+
+
+
+
+<option value="HTMLTableColElement06.html">HTMLTableColElement06</option>
+
+
+
+
+<option value="HTMLTableColElement07.html">HTMLTableColElement07</option>
+
+
+
+
+<option value="HTMLTableColElement08.html">HTMLTableColElement08</option>
+
+
+
+
+<option value="HTMLTableColElement09.html">HTMLTableColElement09</option>
+
+
+
+
+<option value="HTMLTableColElement10.html">HTMLTableColElement10</option>
+
+
+
+
+<option value="HTMLTableColElement11.html">HTMLTableColElement11</option>
+
+
+
+
+<option value="HTMLTableColElement12.html">HTMLTableColElement12</option>
+
+
+
+
+<option value="HTMLTableElement01.html">HTMLTableElement01</option>
+
+
+
+
+<option value="HTMLTableElement02.html">HTMLTableElement02</option>
+
+
+
+
+<option value="HTMLTableElement03.html">HTMLTableElement03</option>
+
+
+
+
+<option value="HTMLTableElement04.html">HTMLTableElement04</option>
+
+
+
+
+<option value="HTMLTableElement05.html">HTMLTableElement05</option>
+
+
+
+
+<option value="HTMLTableElement06.html">HTMLTableElement06</option>
+
+
+
+
+<option value="HTMLTableElement07.html">HTMLTableElement07</option>
+
+
+
+
+<option value="HTMLTableElement08.html">HTMLTableElement08</option>
+
+
+
+
+<option value="HTMLTableElement09.html">HTMLTableElement09</option>
+
+
+
+
+<option value="HTMLTableElement10.html">HTMLTableElement10</option>
+
+
+
+
+<option value="HTMLTableElement11.html">HTMLTableElement11</option>
+
+
+
+
+<option value="HTMLTableElement12.html">HTMLTableElement12</option>
+
+
+
+
+<option value="HTMLTableElement13.html">HTMLTableElement13</option>
+
+
+
+
+<option value="HTMLTableElement14.html">HTMLTableElement14</option>
+
+
+
+
+<option value="HTMLTableElement15.html">HTMLTableElement15</option>
+
+
+
+
+<option value="HTMLTableElement16.html">HTMLTableElement16</option>
+
+
+
+
+<option value="HTMLTableElement17.html">HTMLTableElement17</option>
+
+
+
+
+<option value="HTMLTableElement18.html">HTMLTableElement18</option>
+
+
+
+
+<option value="HTMLTableElement19.html">HTMLTableElement19</option>
+
+
+
+
+<option value="HTMLTableElement20.html">HTMLTableElement20</option>
+
+
+
+
+<option value="HTMLTableElement21.html">HTMLTableElement21</option>
+
+
+
+
+<option value="HTMLTableElement22.html">HTMLTableElement22</option>
+
+
+
+
+<option value="HTMLTableElement23.html">HTMLTableElement23</option>
+
+
+
+
+<option value="HTMLTableElement24.html">HTMLTableElement24</option>
+
+
+
+
+<option value="HTMLTableElement25.html">HTMLTableElement25</option>
+
+
+
+
+<option value="HTMLTableElement26.html">HTMLTableElement26</option>
+
+
+
+
+<option value="HTMLTableElement27.html">HTMLTableElement27</option>
+
+
+
+
+<option value="HTMLTableElement28.html">HTMLTableElement28</option>
+
+
+
+
+<option value="HTMLTableElement29.html">HTMLTableElement29</option>
+
+
+
+
+<option value="HTMLTableElement30.html">HTMLTableElement30</option>
+
+
+
+
+<option value="HTMLTableElement31.html">HTMLTableElement31</option>
+
+
+
+
+<option value="HTMLTableElement32.html">HTMLTableElement32</option>
+
+
+
+
+<option value="HTMLTableElement33.html">HTMLTableElement33</option>
+
+
+
+
+<option value="HTMLTableRowElement01.html">HTMLTableRowElement01</option>
+
+
+
+
+<option value="HTMLTableRowElement02.html">HTMLTableRowElement02</option>
+
+
+
+
+<option value="HTMLTableRowElement03.html">HTMLTableRowElement03</option>
+
+
+
+
+<option value="HTMLTableRowElement04.html">HTMLTableRowElement04</option>
+
+
+
+
+<option value="HTMLTableRowElement05.html">HTMLTableRowElement05</option>
+
+
+
+
+<option value="HTMLTableRowElement06.html">HTMLTableRowElement06</option>
+
+
+
+
+<option value="HTMLTableRowElement07.html">HTMLTableRowElement07</option>
+
+
+
+
+<option value="HTMLTableRowElement08.html">HTMLTableRowElement08</option>
+
+
+
+
+<option value="HTMLTableRowElement09.html">HTMLTableRowElement09</option>
+
+
+
+
+<option value="HTMLTableRowElement10.html">HTMLTableRowElement10</option>
+
+
+
+
+<option value="HTMLTableRowElement11.html">HTMLTableRowElement11</option>
+
+
+
+
+<option value="HTMLTableRowElement12.html">HTMLTableRowElement12</option>
+
+
+
+
+<option value="HTMLTableRowElement13.html">HTMLTableRowElement13</option>
+
+
+
+
+<option value="HTMLTableRowElement14.html">HTMLTableRowElement14</option>
+
+
+
+
+<option value="HTMLTableSectionElement01.html">HTMLTableSectionElement01</option>
+
+
+
+
+<option value="HTMLTableSectionElement02.html">HTMLTableSectionElement02</option>
+
+
+
+
+<option value="HTMLTableSectionElement03.html">HTMLTableSectionElement03</option>
+
+
+
+
+<option value="HTMLTableSectionElement04.html">HTMLTableSectionElement04</option>
+
+
+
+
+<option value="HTMLTableSectionElement05.html">HTMLTableSectionElement05</option>
+
+
+
+
+<option value="HTMLTableSectionElement06.html">HTMLTableSectionElement06</option>
+
+
+
+
+<option value="HTMLTableSectionElement07.html">HTMLTableSectionElement07</option>
+
+
+
+
+<option value="HTMLTableSectionElement08.html">HTMLTableSectionElement08</option>
+
+
+
+
+<option value="HTMLTableSectionElement09.html">HTMLTableSectionElement09</option>
+
+
+
+
+<option value="HTMLTableSectionElement10.html">HTMLTableSectionElement10</option>
+
+
+
+
+<option value="HTMLTableSectionElement11.html">HTMLTableSectionElement11</option>
+
+
+
+
+<option value="HTMLTableSectionElement12.html">HTMLTableSectionElement12</option>
+
+
+
+
+<option value="HTMLTableSectionElement13.html">HTMLTableSectionElement13</option>
+
+
+
+
+<option value="HTMLTableSectionElement14.html">HTMLTableSectionElement14</option>
+
+
+
+
+<option value="HTMLTableSectionElement15.html">HTMLTableSectionElement15</option>
+
+
+
+
+<option value="HTMLTableSectionElement16.html">HTMLTableSectionElement16</option>
+
+
+
+
+<option value="HTMLTableSectionElement17.html">HTMLTableSectionElement17</option>
+
+
+
+
+<option value="HTMLTableSectionElement18.html">HTMLTableSectionElement18</option>
+
+
+
+
+<option value="HTMLTableSectionElement19.html">HTMLTableSectionElement19</option>
+
+
+
+
+<option value="HTMLTableSectionElement20.html">HTMLTableSectionElement20</option>
+
+
+
+
+<option value="HTMLTableSectionElement21.html">HTMLTableSectionElement21</option>
+
+
+
+
+<option value="HTMLTableSectionElement22.html">HTMLTableSectionElement22</option>
+
+
+
+
+<option value="HTMLTableSectionElement23.html">HTMLTableSectionElement23</option>
+
+
+
+
+<option value="HTMLTableSectionElement24.html">HTMLTableSectionElement24</option>
+
+
+
+
+<option value="HTMLTextAreaElement01.html">HTMLTextAreaElement01</option>
+
+
+
+
+<option value="HTMLTextAreaElement02.html">HTMLTextAreaElement02</option>
+
+
+
+
+<option value="HTMLTextAreaElement03.html">HTMLTextAreaElement03</option>
+
+
+
+
+<option value="HTMLTextAreaElement04.html">HTMLTextAreaElement04</option>
+
+
+
+
+<option value="HTMLTextAreaElement05.html">HTMLTextAreaElement05</option>
+
+
+
+
+<option value="HTMLTextAreaElement06.html">HTMLTextAreaElement06</option>
+
+
+
+
+<option value="HTMLTextAreaElement07.html">HTMLTextAreaElement07</option>
+
+
+
+
+<option value="HTMLTextAreaElement08.html">HTMLTextAreaElement08</option>
+
+
+
+
+<option value="HTMLTextAreaElement09.html">HTMLTextAreaElement09</option>
+
+
+
+
+<option value="HTMLTextAreaElement10.html">HTMLTextAreaElement10</option>
+
+
+
+
+<option value="HTMLTextAreaElement11.html">HTMLTextAreaElement11</option>
+
+
+
+
+<option value="HTMLTextAreaElement12.html">HTMLTextAreaElement12</option>
+
+
+
+
+<option value="HTMLTextAreaElement13.html">HTMLTextAreaElement13</option>
+
+
+
+
+<option value="HTMLTextAreaElement14.html">HTMLTextAreaElement14</option>
+
+
+
+
+<option value="HTMLTextAreaElement15.html">HTMLTextAreaElement15</option>
+
+
+
+
+<option value="HTMLTitleElement01.html">HTMLTitleElement01</option>
+
+
+
+
+<option value="HTMLUListElement01.html">HTMLUListElement01</option>
+
+
+
+
+<option value="HTMLUListElement02.html">HTMLUListElement02</option>
+
+
+
+
+<option value="object01.html">object01</option>
+
+
+
+
+<option value="object02.html">object02</option>
+
+
+
+
+<option value="object03.html">object03</option>
+
+
+
+
+<option value="object04.html">object04</option>
+
+
+
+
+<option value="object05.html">object05</option>
+
+
+
+
+<option value="object06.html">object06</option>
+
+
+
+
+<option value="object07.html">object07</option>
+
+
+
+
+<option value="object09.html">object09</option>
+
+
+
+
+<option value="object10.html">object10</option>
+
+
+
+
+<option value="object11.html">object11</option>
+
+
+
+
+<option value="object12.html">object12</option>
+
+
+
+
+<option value="object14.html">object14</option>
+
+
+
+
+<option value="object15.html">object15</option>
+
+
+
+
+<option value="table01.html">table01</option>
+
+
+
+
+<option value="table02.html">table02</option>
+
+
+
+
+<option value="table03.html">table03</option>
+
+
+
+
+<option value="table04.html">table04</option>
+
+
+
+
+<option value="table06.html">table06</option>
+
+
+
+
+<option value="table07.html">table07</option>
+
+
+
+
+<option value="table08.html">table08</option>
+
+
+
+
+<option value="table09.html">table09</option>
+
+
+
+
+<option value="table10.html">table10</option>
+
+
+
+
+<option value="table12.html">table12</option>
+
+
+
+
+<option value="table15.html">table15</option>
+
+
+
+
+<option value="table17.html">table17</option>
+
+
+
+
+<option value="table18.html">table18</option>
+
+
+
+
+<option value="table19.html">table19</option>
+
+
+
+
+<option value="table20.html">table20</option>
+
+
+
+
+<option value="table21.html">table21</option>
+
+
+
+
+<option value="table22.html">table22</option>
+
+
+
+
+<option value="table23.html">table23</option>
+
+
+
+
+<option value="table24.html">table24</option>
+
+
+
+
+<option value="table25.html">table25</option>
+
+
+
+
+<option value="table26.html">table26</option>
+
+
+
+
+<option value="table27.html">table27</option>
+
+
+
+
+<option value="table28.html">table28</option>
+
+
+
+
+<option value="table29.html">table29</option>
+
+
+
+
+<option value="table30.html">table30</option>
+
+
+
+
+<option value="table31.html">table31</option>
+
+
+
+
+<option value="table32.html">table32</option>
+
+
+
+
+<option value="table33.html">table33</option>
+
+
+
+
+<option value="table34.html">table34</option>
+
+
+
+
+<option value="table35.html">table35</option>
+
+
+
+
+<option value="table36.html">table36</option>
+
+
+
+
+<option value="table37.html">table37</option>
+
+
+
+
+<option value="table38.html">table38</option>
+
+
+
+
+<option value="table39.html">table39</option>
+
+
+
+
+<option value="table40.html">table40</option>
+
+
+
+
+<option value="table41.html">table41</option>
+
+
+
+
+<option value="table42.html">table42</option>
+
+
+
+
+<option value="table43.html">table43</option>
+
+
+
+
+<option value="table44.html">table44</option>
+
+
+
+
+<option value="table45.html">table45</option>
+
+
+
+
+<option value="table46.html">table46</option>
+
+
+
+
+<option value="table47.html">table47</option>
+
+
+
+
+<option value="table48.html">table48</option>
+
+
+
+
+<option value="table49.html">table49</option>
+
+
+
+
+<option value="table50.html">table50</option>
+
+
+
+
+<option value="table51.html">table51</option>
+
+
+
+
+<option value="table52.html">table52</option>
+
+
+
+
+<option value="table53.html">table53</option>
+
+
+
+
+<option value="hasFeature02.html">hasFeature02</option>
+<option value="hasFeature03.html">hasFeature03</option>
+<option value="hasFeature04.html">hasFeature04</option>
+<option value="hasFeature05.html">hasFeature05</option>
+<option value="hasFeature06.html">hasFeature06</option>
+<option value="HTMLAppletElement07.html">HTMLAppletElement07</option>
+<option value="HTMLAppletElement09.html">HTMLAppletElement09</option>
+<option value="HTMLBodyElement07.html">HTMLBodyElement07</option>
+<option value="HTMLBodyElement08.html">HTMLBodyElement08</option>
+<option value="HTMLBodyElement09.html">HTMLBodyElement09</option>
+<option value="HTMLBodyElement10.html">HTMLBodyElement10</option>
+<option value="HTMLBodyElement11.html">HTMLBodyElement11</option>
+<option value="HTMLBodyElement12.html">HTMLBodyElement12</option>
+<option value="HTMLDocument22.html">HTMLDocument22</option>
+<option value="HTMLDocument23.html">HTMLDocument23</option>
+<option value="HTMLDocument24.html">HTMLDocument24</option>
+<option value="HTMLDocument25.html">HTMLDocument25</option>
+<option value="HTMLDocument26.html">HTMLDocument26</option>
+<option value="HTMLDocument27.html">HTMLDocument27</option>
+<option value="HTMLFrameElement09.html">HTMLFrameElement09</option>
+<option value="HTMLIFrameElement11.html">HTMLIFrameElement11</option>
+<option value="HTMLImageElement05.html">HTMLImageElement05</option>
+<option value="HTMLImageElement06.html">HTMLImageElement06</option>
+<option value="HTMLImageElement11.html">HTMLImageElement11</option>
+<option value="HTMLImageElement12.html">HTMLImageElement12</option>
+<option value="HTMLInputElement13.html">HTMLInputElement13</option>
+<option value="HTMLObjectElement11.html">HTMLObjectElement11</option>
+<option value="HTMLObjectElement16.html">HTMLObjectElement16</option>
+<option value="HTMLObjectElement20.html">HTMLObjectElement20</option>
+<option value="HTMLOptionsCollection01.html">HTMLOptionsCollection01</option>
+<option value="HTMLOptionsCollection02.html">HTMLOptionsCollection02</option>
+<option value="HTMLOptionsCollection03.html">HTMLOptionsCollection03</option>
+<option value="HTMLOptionsCollection04.html">HTMLOptionsCollection04</option>
+<option value="HTMLOptionsCollection05.html">HTMLOptionsCollection05</option>
+<option value="HTMLOptionsCollection06.html">HTMLOptionsCollection06</option>
+<option value="HTMLOptionsCollection07.html">HTMLOptionsCollection07</option>
+<option value="HTMLSelectElement20.html">HTMLSelectElement20</option>
+<option value="HTMLTableElement34.html">HTMLTableElement34</option>
+<option value="HTMLTableElement35.html">HTMLTableElement35</option>
+<option value="HTMLTableElement36.html">HTMLTableElement36</option>
+<option value="HTMLTableElement37.html">HTMLTableElement37</option>
+<option value="HTMLTableElement38.html">HTMLTableElement38</option>
+<option value="HTMLTableElement39.html">HTMLTableElement39</option>
+<option value="HTMLTableElement40.html">HTMLTableElement40</option>
+<option value="HTMLTableRowElement15.html">HTMLTableRowElement15</option>
+<option value="HTMLTableRowElement16.html">HTMLTableRowElement16</option>
+<option value="HTMLTableRowElement17.html">HTMLTableRowElement17</option>
+<option value="HTMLTableRowElement18.html">HTMLTableRowElement18</option>
+<option value="HTMLTableRowElement19.html">HTMLTableRowElement19</option>
+<option value="HTMLTableRowElement20.html">HTMLTableRowElement20</option>
+<option value="HTMLTableRowElement21.html">HTMLTableRowElement21</option>
+<option value="HTMLTableSectionElement25.html">HTMLTableSectionElement25</option>
+<option value="HTMLTableSectionElement26.html">HTMLTableSectionElement26</option>
+<option value="HTMLTableSectionElement27.html">HTMLTableSectionElement27</option>
+<option value="HTMLTableSectionElement28.html">HTMLTableSectionElement28</option>
+<option value="HTMLTableSectionElement29.html">HTMLTableSectionElement29</option>
+<option value="HTMLTableSectionElement30.html">HTMLTableSectionElement30</option>
+<option value="HTMLTableSectionElement31.html">HTMLTableSectionElement31</option>
+<option value="object08.html">object08</option>
+<option value="object13.html">object13</option>
+</select></td><td align="right"><input value="Load JSUnit" type="submit"></td>
+</tr>
+</table>
+</td>
+</tr>
+<tr>
+<td>
+<table summary="Configuration" width="100%" border="1">
+<tr>
+<th>Implementation</th><th>Configuration</th><th>Content Type</th>
+</tr>
+<tr>
+<td valign="top"><input onclick="onImplementationChange()" checked value="iframe" id="iframeImpl" name="implementation" type="radio"> iframe<br>
+<input onclick="onImplementationChange()" value="dom3ls" id="dom3lsImpl" name="implementation" type="radio"> DOM 3 Load/Save<br>
+ Features: <input disabled name="dom3lsFeatures" type="text">
+<br>
+<input onclick="onImplementationChange()" value="mozillaXML" id="mozillaXMLImpl" name="implementation" type="radio"> Mozilla XML<br>
+<input onclick="onImplementationChange()" value="msxml3" id="msxml3Impl" name="implementation" type="radio"> MSXML 3.0<br>
+<input onclick="onImplementationChange()" value="msxml4" id="msxml4Impl" name="implementation" type="radio"> MSXML 4.0<br>
+<input onclick="onImplementationChange()" value="svgplugin" id="svgpluginImpl" name="implementation" type="radio"> SVG Plugin<br>
+</td><td valign="top"><input disabled checked type="checkbox" name="asynchronous" onclick="setAsynchronous(true)"> Asynchronous<br>
+<input onclick="setImplementationAttribute('expandEntityReferences', true)" disabled value="true" name="expandEntityReferences" type="checkbox"> Expanding Entities<br>
+<input onclick="setImplementationAttribute('ignoringElementContentWhitespace', true)" disabled value="true" name="ignoringElementContentWhitespace" type="checkbox"> Ignoring whitespace<br>
+<input onclick="setImplementationAttribute('validating', true)" disabled value="true" name="validating" type="checkbox"> Validating<br>
+<input onclick="setImplementationAttribute('coalescing', true)" disabled value="true" name="coalescing" type="checkbox"> Coalescing<br>
+<input onclick="setImplementationAttribute('namespaceAware', true)" disabled value="true" name="namespaceAware" type="checkbox"> Namespace aware<br>
+<input onclick="setImplementationAttribute('ignoringComments', true)" checked disabled value="true" name="ignoringComments" type="checkbox"> Ignoring comments<br>
+<input checked value="true" name="skipIncompatibleTests" type="checkbox"> Skip incompatible tests<br>
+<input value="true" checked name="autorun" type="checkbox"> Autorun<br>
+<input onclick="updateTestSubmission()" name="submitCheckbox" type="checkbox"> Submit results<br>
+ Acceptor: http://<input size="35" disabled value="" name="submitresults" type="text">
+<br>
+ Result ID: <input disabled value="" name="resultid" type="text">
+<br>
+</td><td valign="top"><input onclick="setContentType('text/xml')" value="text/xml" id="contentTypeXML" name="contentType" type="radio">XML<br>
+<input onclick="setContentType('text/html')" checked value="text/html" id="contentTypeHTML" name="contentType" type="radio">HTML<br>
+<input onclick="setContentType('application/xhtml+xml')" value="application/xhtml+xml" id="contentTypeXHTML" name="contentType" type="radio">XHTML<br>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</form>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor01.html b/dom/tests/mochitest/dom-level2-html/test_anchor01.html
new file mode 100644
index 0000000000..60bc37a436
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor01.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+A single character access key to give access to the form control.
+The value of attribute accessKey of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724
+*/
+function anchor01() {
+ var success;
+ if(checkInitialization(builder, "anchor01") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","g",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor01</h2>
+<p>&lt;test name='anchor01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+A single character access key to give access to the form control.
+The value of attribute accessKey of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89647724</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLAnchorElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"g"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor02.html b/dom/tests/mochitest/dom-level2-html/test_anchor02.html
new file mode 100644
index 0000000000..90a5f26f4e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor02.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The character encoding of the linked resource.
+The value of attribute charset of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266
+*/
+function anchor02() {
+ var success;
+ if(checkInitialization(builder, "anchor02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcharset;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcharset = testNode.charset;
+
+ assertEquals("charsetLink","US-ASCII",vcharset);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor02</h2>
+<p>&lt;test name='anchor02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The character encoding of the linked resource.
+The value of attribute charset of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67619266</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcharset' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;charset interface='HTMLAnchorElement' obj='testNode' var='vcharset'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcharset' expected='"US-ASCII"' <a id="charsetLink">id='charsetLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor03.html b/dom/tests/mochitest/dom-level2-html/test_anchor03.html
new file mode 100644
index 0000000000..764561b853
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor03.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Comma-separated list of lengths, defining an active region geometry.
+The value of attribute coords of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539
+*/
+function anchor03() {
+ var success;
+ if(checkInitialization(builder, "anchor03") != null) return;
+ var nodeList;
+ var testNode;
+ var vcoords;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcoords = testNode.coords;
+
+ assertEquals("coordsLink","0,0,100,100",vcoords);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor03</h2>
+<p>&lt;test name='anchor03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Comma-separated list of lengths, defining an active region geometry.
+The value of attribute coords of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92079539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcoords' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;coords interface='HTMLAnchorElement' obj='testNode' var='vcoords'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcoords' expected='"0,0,100,100"' <a id="coordsLink">id='coordsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor04.html b/dom/tests/mochitest/dom-level2-html/test_anchor04.html
new file mode 100644
index 0000000000..8f6fdf5df4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor04.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The URI of the linked resource.
+The value of attribute href of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319
+*/
+function anchor04() {
+ var success;
+ if(checkInitialization(builder, "anchor04") != null) return;
+ var nodeList;
+ var testNode;
+ var vhref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vhref = testNode.href;
+
+ assertURIEquals("hrefLink",null,null,null,"submit.gif",null,null,null,true,vhref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor04</h2>
+<p>&lt;test name='anchor04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The URI of the linked resource.
+The value of attribute href of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88517319</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhref' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;href interface='HTMLAnchorElement' obj='testNode' var='vhref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertURIEquals actual='vhref' isAbsolute='true' file='"submit.gif"' <a id="hrefLink">id='hrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor05.html b/dom/tests/mochitest/dom-level2-html/test_anchor05.html
new file mode 100644
index 0000000000..d62a04253c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor05.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Advisory content type.
+The value of attribute type of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221
+*/
+function anchor05() {
+ var success;
+ if(checkInitialization(builder, "anchor05") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","image/gif",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor05</h2>
+<p>&lt;test name='anchor05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Advisory content type.
+The value of attribute type of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63938221</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLAnchorElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"image/gif"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_anchor06.html b/dom/tests/mochitest/dom-level2-html/test_anchor06.html
new file mode 100644
index 0000000000..1be5b39431
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_anchor06.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['anchor06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The shape of the active area. The coordinates are given by coords
+The value of attribute shape of the anchor element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808
+*/
+function anchor06() {
+ var success;
+ if(checkInitialization(builder, "anchor06") != null) return;
+ var nodeList;
+ var testNode;
+ var vshape;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ nodeList = doc.getElementsByTagName("a");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vshape = testNode.shape;
+
+ assertEquals("shapeLink","rect",vshape);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/anchor06</h2>
+<p>&lt;test name='anchor06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;anchor06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The shape of the active area. The coordinates are given by coords
+The value of attribute shape of the anchor element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-02&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-49899808</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vshape' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"a"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;shape interface='HTMLAnchorElement' obj='testNode' var='vshape'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vshape' expected='"rect"' <a id="shapeLink">id='shapeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_area01.html b/dom/tests/mochitest/dom-level2-html/test_area01.html
new file mode 100644
index 0000000000..6d86909f6d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_area01.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/area01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['area01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476
+*/
+function area01() {
+ var success;
+ if(checkInitialization(builder, "area01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcoords;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcoords = testNode.coords;
+
+ assertEquals("coordsLink","0,2,45,45",vcoords);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/area01</h2>
+<p>&lt;test name='area01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;area01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-66021476</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcoords' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;coords interface='HTMLAreaElement' obj='testNode' var='vcoords'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcoords' expected='"0,2,45,45"' <a id="coordsLink">id='coordsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_area02.html b/dom/tests/mochitest/dom-level2-html/test_area02.html
new file mode 100644
index 0000000000..fb9db8319b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_area02.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/area02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['area02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871
+*/
+function area02() {
+ var success;
+ if(checkInitialization(builder, "area02") != null) return;
+ var nodeList;
+ var testNode;
+ var vnohref;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vnohref = testNode.noHref;
+
+ assertFalse("noHrefLink",vnohref);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/area02</h2>
+<p>&lt;test name='area02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;area02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-61826871</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnohref' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noHref interface='HTMLAreaElement' obj='testNode' var='vnohref'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertFalse actual='vnohref' <a id="noHrefLink">id='noHrefLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_area03.html b/dom/tests/mochitest/dom-level2-html/test_area03.html
new file mode 100644
index 0000000000..98dd3e521e
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_area03.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/area03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['area03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121
+*/
+function area03() {
+ var success;
+ if(checkInitialization(builder, "area03") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",10,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/area03</h2>
+<p>&lt;test name='area03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;area03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-8722121</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLAreaElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='10' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_area04.html b/dom/tests/mochitest/dom-level2-html/test_area04.html
new file mode 100644
index 0000000000..0c91403e0c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_area04.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/area04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['area04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "area");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457
+*/
+function area04() {
+ var success;
+ if(checkInitialization(builder, "area04") != null) return;
+ var nodeList;
+ var testNode;
+ var vaccesskey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "area");
+ nodeList = doc.getElementsByTagName("area");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vaccesskey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","a",vaccesskey);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/area04</h2>
+<p>&lt;test name='area04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;area04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57944457</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaccesskey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='area' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"area"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLAreaElement' obj='testNode' var='vaccesskey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaccesskey' expected='"a"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/area.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_body01.html b/dom/tests/mochitest/dom-level2-html/test_body01.html
new file mode 100644
index 0000000000..417329e475
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_body01.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/body01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['body01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "body");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Color of active links (after mouse-button down, but before mouse-button up).
+The value of attribute alink of the body element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581
+*/
+function body01() {
+ var success;
+ if(checkInitialization(builder, "body01") != null) return;
+ var nodeList;
+ var testNode;
+ var valink;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "body");
+ nodeList = doc.getElementsByTagName("body");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valink = testNode.aLink;
+
+ assertEquals("aLinkLink","#0000ff",valink);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/body01</h2>
+<p>&lt;test name='body01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;body01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Color of active links (after mouse-button down, but before mouse-button up).
+The value of attribute alink of the body element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59424581</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valink' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='body' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"body"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;aLink interface='HTMLBodyElement' obj='testNode' var='valink'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valink' expected='"#0000ff"' <a id="aLinkLink">id='aLinkLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/body.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button01.html b/dom/tests/mochitest/dom-level2-html/test_button01.html
new file mode 100644
index 0000000000..cd3bb8f8cc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button01.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+*/
+function button01() {
+ var success;
+ if(checkInitialization(builder, "button01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vform = testNode.form;
+
+ assertNull("formLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button01</h2>
+<p>&lt;test name='button01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formLink">id='formLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button02.html b/dom/tests/mochitest/dom-level2-html/test_button02.html
new file mode 100644
index 0000000000..a4cae627d3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button02.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute name of the form element which contains this button is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901
+*/
+function button02() {
+ var success;
+ if(checkInitialization(builder, "button02") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var vfname;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ formNode = testNode.form;
+
+ vfname = formNode.id;
+
+ assertEquals("formLink","form2",vfname);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button02</h2>
+<p>&lt;test name='button02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute name of the form element which contains this button is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-63534901</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vfname' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='formNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;id interface='HTMLElement' obj='formNode' var='vfname'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vfname' expected='"form2"' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button03.html b/dom/tests/mochitest/dom-level2-html/test_button03.html
new file mode 100644
index 0000000000..3e81c10024
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button03.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute action of the form element which contains this button is read and checked against the expected value
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184
+*/
+function button03() {
+ var success;
+ if(checkInitialization(builder, "button03") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var vfaction;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ formNode = testNode.form;
+
+ vfaction = formNode.action;
+
+ // its not clear that this test is valid
+ // mozilla returns a fully expanded uri
+ is(vfaction, formNode.ownerDocument.location.href.replace(/button\.html/, "..."), "formLink");
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button03</h2>
+<p>&lt;test name='button03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute action of the form element which contains this button is read and checked against the expected value
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74049184</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vfaction' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='formNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action interface='HTMLFormElement' obj='formNode' var='vfaction'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vfaction' expected='"..."' <a id="formLink">id='formLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button04.html b/dom/tests/mochitest/dom-level2-html/test_button04.html
new file mode 100644
index 0000000000..b34171f23c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button04.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute method of the form element which contains this button is read and checked against the expected value
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539
+*/
+function button04() {
+ var success;
+ if(checkInitialization(builder, "button04") != null) return;
+ var nodeList;
+ var testNode;
+ var formNode;
+ var vfmethod;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ formNode = testNode.form;
+
+ vfmethod = formNode.method;
+
+ assertEquals("formLink","POST".toLowerCase(),vfmethod.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button04</h2>
+<p>&lt;test name='button04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute method of the form element which contains this button is read and checked against the expected value
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-71254493</a>'/&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82545539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='formNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vfmethod' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLButtonElement' obj='testNode' var='formNode'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;method interface='HTMLFormElement' obj='formNode' var='vfmethod'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vfmethod' expected='"POST"' <a id="formLink">id='formLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button05.html b/dom/tests/mochitest/dom-level2-html/test_button05.html
new file mode 100644
index 0000000000..2d6b6d7dbc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button05.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+A single character access key to give access to the form control.
+The value of attribute accessKey of the button element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431
+*/
+function button05() {
+ var success;
+ if(checkInitialization(builder, "button05") != null) return;
+ var nodeList;
+ var testNode;
+ var vakey;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vakey = testNode.accessKey;
+
+ assertEquals("accessKeyLink","f".toLowerCase(),vakey.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button05</h2>
+<p>&lt;test name='button05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+A single character access key to give access to the form control.
+The value of attribute accessKey of the button element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-73169431</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vakey' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;accessKey interface='HTMLButtonElement' obj='testNode' var='vakey'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vakey' expected='"f"' <a id="accessKeyLink">id='accessKeyLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button06.html b/dom/tests/mochitest/dom-level2-html/test_button06.html
new file mode 100644
index 0000000000..8d11cd16e4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button06.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Index that represents the element's position in the tabbing order.
+The value of attribute tabIndex of the button element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908
+*/
+function button06() {
+ var success;
+ if(checkInitialization(builder, "button06") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabIndex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtabIndex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",20,vtabIndex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button06</h2>
+<p>&lt;test name='button06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Index that represents the element's position in the tabbing order.
+The value of attribute tabIndex of the button element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-39190908</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabIndex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLButtonElement' obj='testNode' var='vtabIndex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabIndex' expected='20' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button07.html b/dom/tests/mochitest/dom-level2-html/test_button07.html
new file mode 100644
index 0000000000..aaae8e6922
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button07.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The type of button
+The value of attribute type of the button element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092
+*/
+function button07() {
+ var success;
+ if(checkInitialization(builder, "button07") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","reset",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button07</h2>
+<p>&lt;test name='button07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The type of button
+The value of attribute type of the button element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27430092</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLButtonElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"reset"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button08.html b/dom/tests/mochitest/dom-level2-html/test_button08.html
new file mode 100644
index 0000000000..a7a48caa42
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button08.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The control is unavailable in this context.
+The boolean value of attribute disabled of the button element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155
+*/
+function button08() {
+ var success;
+ if(checkInitialization(builder, "button08") != null) return;
+ var nodeList;
+ var testNode;
+ var vdisabled;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vdisabled = testNode.disabled;
+
+ assertTrue("disabledLink",vdisabled);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button08</h2>
+<p>&lt;test name='button08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The control is unavailable in this context.
+The boolean value of attribute disabled of the button element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-92757155</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdisabled' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;disabled interface='HTMLButtonElement' obj='testNode' var='vdisabled'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vdisabled' <a id="disabledLink">id='disabledLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_button09.html b/dom/tests/mochitest/dom-level2-html/test_button09.html
new file mode 100644
index 0000000000..4917f7f78f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_button09.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/button09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['button09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "button");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The current form control value.
+The value of attribute value of the button element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782
+*/
+function button09() {
+ var success;
+ if(checkInitialization(builder, "button09") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalue;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "button");
+ nodeList = doc.getElementsByTagName("button");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vvalue = testNode.value;
+
+ assertEquals("typeLink","Reset Disabled Button",vvalue);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/button09</h2>
+<p>&lt;test name='button09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;button09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The current form control value.
+The value of attribute value of the button element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-03-09&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-72856782</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalue' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='button' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"button"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;value interface='HTMLButtonElement' obj='testNode' var='vvalue'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalue' expected='"Reset Disabled Button"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/button.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_dlist01.html b/dom/tests/mochitest/dom-level2-html/test_dlist01.html
new file mode 100644
index 0000000000..3e756c4ec2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_dlist01.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/dlist01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['dlist01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "dl");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539
+*/
+function dlist01() {
+ var success;
+ if(checkInitialization(builder, "dlist01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcompact;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "dl");
+ nodeList = doc.getElementsByTagName("dl");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcompact = testNode.compact;
+
+ assertTrue("compactLink",vcompact);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/dlist01</h2>
+<p>&lt;test name='dlist01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;dlist01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-21738539</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcompact' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='dl' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"dl"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;compact interface='HTMLDListElement' obj='testNode' var='vcompact'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vcompact' <a id="compactLink">id='compactLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/dl.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_doc01.html b/dom/tests/mochitest/dom-level2-html/test_doc01.html
new file mode 100644
index 0000000000..8e2a0c0eb6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_doc01.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/doc01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['doc01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "anchor");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Retrieve the title attribute of HTMLDocument and examine it's value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827
+*/
+function doc01() {
+ var success;
+ if(checkInitialization(builder, "doc01") != null) return;
+ var vtitle;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "anchor");
+ vtitle = doc.title;
+
+ assertEquals("titleLink","NIST DOM HTML Test - Anchor",vtitle);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/doc01</h2>
+<p>&lt;test name='doc01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;doc01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Retrieve the title attribute of HTMLDocument and examine it's value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-08&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18446827</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtitle' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='anchor' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title interface='HTMLDocument' obj='doc' var='vtitle'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtitle' expected='"NIST DOM HTML Test - Anchor"' <a id="titleLink">id='titleLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/anchor.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature01.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature01.html
new file mode 100644
index 0000000000..fa936ddb04
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature01.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("hTmL", null) should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7
+*/
+function hasFeature01() {
+ var success;
+ // if(checkInitialization(builder, "hasFeature01") != null) return;
+ var doc;
+ var domImpl;
+ var version = null;
+
+ var state;
+ domImpl = getImplementation();
+state = domImpl.hasFeature("hTmL",version);
+assertTrue("hasHTMLnull",state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature01</h2>
+<p>&lt;test name='hasFeature01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("hTmL", null) should return true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' isNull='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"hTmL"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='state' <a id="hasHTMLnull">id='hasHTMLnull'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature02.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature02.html
new file mode 100644
index 0000000000..6a58ca2818
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature02.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("hTmL", "2.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
+*/
+function hasFeature02() {
+ var success;
+ if(checkInitialization(builder, "hasFeature02") != null) return;
+ var doc;
+ var domImpl;
+ var version = "2.0";
+ var state;
+ domImpl = getImplementation();
+state = domImpl.hasFeature("hTmL",version);
+assertTrue("hasHTML2",state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature02</h2>
+<p>&lt;test name='hasFeature02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("hTmL", "2.0") should return true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' value='"2.0"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"hTmL"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='state' <a id="hasHTML2">id='hasHTML2'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature03.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature03.html
new file mode 100644
index 0000000000..25a0cfd8fe
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature03.html
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("xhTmL", null) should return true if hasFeature("XML", null) returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
+*/
+function hasFeature03() {
+ var success;
+ if(checkInitialization(builder, "hasFeature03") != null) return;
+ var doc;
+ var domImpl;
+ var version = null;
+
+ var state;
+ var hasXML;
+ domImpl = getImplementation();
+hasXML = domImpl.hasFeature("XML",version);
+state = domImpl.hasFeature("xhTmL",version);
+assertEquals("hasXHTML",hasXML,state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature03</h2>
+<p>&lt;test name='hasFeature03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("xhTmL", null) should return true if hasFeature("XML", null) returns true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' isNull='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='hasXML' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='hasXML' feature='"XML"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"xhTmL"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='state' expected='hasXML' ignoreCase='false' <a id="hasXHTML">id='hasXHTML'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature04.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature04.html
new file mode 100644
index 0000000000..773b999aa7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature04.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("xhTmL", "2.0") should return true if hasFeature("XML", "2.0") returns true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
+*/
+function hasFeature04() {
+ var success;
+ if(checkInitialization(builder, "hasFeature04") != null) return;
+ var doc;
+ var domImpl;
+ var version = "2.0";
+ var state;
+ var hasXML;
+ domImpl = getImplementation();
+hasXML = domImpl.hasFeature("XML",version);
+state = domImpl.hasFeature("xhTmL",version);
+assertEquals("hasXHTML",hasXML,state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature04</h2>
+<p>&lt;test name='hasFeature04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("xhTmL", "2.0") should return true if hasFeature("XML", "2.0") returns true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' value='"2.0"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='hasXML' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='hasXML' feature='"XML"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"xhTmL"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='state' expected='hasXML' ignoreCase='false' <a id="hasXHTML">id='hasXHTML'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature05.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature05.html
new file mode 100644
index 0000000000..e765457cf6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature05.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("cOrE", null) should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
+*/
+function hasFeature05() {
+ var success;
+ if(checkInitialization(builder, "hasFeature05") != null) return;
+ var doc;
+ var domImpl;
+ var version = null;
+
+ var state;
+ domImpl = getImplementation();
+state = domImpl.hasFeature("cOrE",version);
+assertTrue("hasCore",state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature05</h2>
+<p>&lt;test name='hasFeature05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("cOrE", null) should return true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' isNull='true'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"cOrE"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='state' <a id="hasCore">id='hasCore'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_hasFeature06.html b/dom/tests/mochitest/dom-level2-html/test_hasFeature06.html
new file mode 100644
index 0000000000..596d8e3fff
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_hasFeature06.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['hasFeature06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ if (docsLoaded == 0) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+ runJSUnitTests();
+ SimpleTest.finish();
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 0) {
+ setUpPageStatus = 'complete';
+ }
+}
+
+
+/**
+*
+hasFeature("cOrE", "2.0") should return true.
+
+* @author Curt Arnold
+* @see http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7
+*/
+function hasFeature06() {
+ var success;
+ if(checkInitialization(builder, "hasFeature06") != null) return;
+ var doc;
+ var domImpl;
+ var version = "2.0";
+ var state;
+ domImpl = getImplementation();
+state = domImpl.hasFeature("cOrE",version);
+assertTrue("hasCore",state);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/hasFeature06</h2>
+<p>&lt;test name='hasFeature06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;hasFeature06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Curt Arnold&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+hasFeature("cOrE", "2.0") should return true.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2004-03-18&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7">http://www.w3.org/TR/DOM-Level-2-Core/core#ID-5CED94D7</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Document'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='domImpl' type='DOMImplementation'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='version' type='DOMString' value='"2.0"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='state' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;implementation var='domImpl'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hasFeature obj='domImpl' var='state' feature='"cOrE"' version='version'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='state' <a id="hasCore">id='hasCore'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object01.html b/dom/tests/mochitest/dom-level2-html/test_object01.html
new file mode 100644
index 0000000000..e3bea15712
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object01.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
+The value of attribute form of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773
+*/
+function object01() {
+ var success;
+ if(checkInitialization(builder, "object01") != null) return;
+ var nodeList;
+ var testNode;
+ var vform;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vform = testNode.form;
+
+ assertNull("formLink",vform);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object01</h2>
+<p>&lt;test name='object01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Returns the FORM element containing this control. Returns null if this control is not within the context of a form.
+The value of attribute form of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-46094773</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vform' type='HTMLFormElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;form interface='HTMLObjectElement' obj='testNode' var='vform'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vform' <a id="formLink">id='formLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object02.html b/dom/tests/mochitest/dom-level2-html/test_object02.html
new file mode 100644
index 0000000000..4cc91da2d2
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object02.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Aligns this object (vertically or horizontally) with respect to its surrounding text.
+The value of attribute align of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097
+*/
+function object02() {
+ var success;
+ if(checkInitialization(builder, "object02") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","middle",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object02</h2>
+<p>&lt;test name='object02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Aligns this object (vertically or horizontally) with respect to its surrounding text.
+The value of attribute align of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16962097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLObjectElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"middle"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object03.html b/dom/tests/mochitest/dom-level2-html/test_object03.html
new file mode 100644
index 0000000000..f3523bcf38
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object03.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Space-separated list of archives
+The value of attribute archive of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837
+*/
+function object03() {
+ var success;
+ if(checkInitialization(builder, "object03") != null) return;
+ var nodeList;
+ var testNode;
+ var varchive;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ varchive = testNode.archive;
+
+ assertEquals("archiveLink","",varchive);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object03</h2>
+<p>&lt;test name='object03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Space-separated list of archives
+The value of attribute archive of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-47783837</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='varchive' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;archive interface='HTMLObjectElement' obj='testNode' var='varchive'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='varchive' expected='""' <a id="archiveLink">id='archiveLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object04.html b/dom/tests/mochitest/dom-level2-html/test_object04.html
new file mode 100644
index 0000000000..0749cf7b4b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object04.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Width of border around the object.
+The value of attribute border of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419
+*/
+function object04() {
+ var success;
+ if(checkInitialization(builder, "object04") != null) return;
+ var nodeList;
+ var testNode;
+ var vborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vborder = testNode.border;
+
+ assertEquals("borderLink","0",vborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object04</h2>
+<p>&lt;test name='object04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Width of border around the object.
+The value of attribute border of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-82818419</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;border interface='HTMLObjectElement' obj='testNode' var='vborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vborder' expected='"0"' <a id="borderLink">id='borderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object05.html b/dom/tests/mochitest/dom-level2-html/test_object05.html
new file mode 100644
index 0000000000..02638b8391
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object05.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object05</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object05'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Base URI for classid, data, and archive attributes.
+The value of attribute codebase of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136
+*/
+function object05() {
+ var success;
+ if(checkInitialization(builder, "object05") != null) return;
+ var nodeList;
+ var testNode;
+ var vcodebase;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vcodebase = testNode.codeBase;
+
+ assertEquals("codebaseLink","http://example.org/",vcodebase);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object05</h2>
+<p>&lt;test name='object05' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object05&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Base URI for classid, data, and archive attributes.
+The value of attribute codebase of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25709136</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcodebase' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;codeBase interface='HTMLObjectElement' obj='testNode' var='vcodebase'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcodebase' expected='"http://xw2k.sdct.itl.nist.gov/brady/dom/"' <a id="codebaseLink">id='codebaseLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object06.html b/dom/tests/mochitest/dom-level2-html/test_object06.html
new file mode 100644
index 0000000000..ba9c065122
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object06.html
@@ -0,0 +1,134 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+A URI specifying the location of the object's data.
+The value of attribute data of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986
+*/
+function object06() {
+ var success;
+ if(checkInitialization(builder, "object06") != null) return;
+ var nodeList;
+ var testNode;
+ var vdata;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vdata = testNode.data;
+ // this test asks for a uri which mozilla fully expands
+ // assertEquals("dataLink","./pix/logo.gif",vdata);
+ todo_is(vdata, "./pix/logo.gif", "dataLink");
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object06</h2>
+<p>&lt;test name='object06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+A URI specifying the location of the object's data.
+The value of attribute data of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-81766986</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vdata' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;data interface='HTMLObjectElement' obj='testNode' var='vdata'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vdata' expected='"./pix/logo.gif"' <a id="dataLink">id='dataLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object07.html b/dom/tests/mochitest/dom-level2-html/test_object07.html
new file mode 100644
index 0000000000..74698fa288
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object07.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute height of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838
+*/
+function object07() {
+ var success;
+ if(checkInitialization(builder, "object07") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","60",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object07</h2>
+<p>&lt;test name='object07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute height of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88925838</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLObjectElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"60"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object08.html b/dom/tests/mochitest/dom-level2-html/test_object08.html
new file mode 100644
index 0000000000..f9196d7efa
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object08.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal space to the left and right of this image, applet, or object.
+The value of attribute hspace of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376
+*/
+function object08() {
+ var success;
+ if(checkInitialization(builder, "object08") != null) return;
+ var nodeList;
+ var testNode;
+ var vhspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vhspace = testNode.hspace;
+
+ assertEquals("hspaceLink",0,vhspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object08</h2>
+<p>&lt;test name='object08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal space to the left and right of this image, applet, or object.
+The value of attribute hspace of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-17085376</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vhspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hspace interface='HTMLObjectElement' obj='testNode' var='vhspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vhspace' expected='0' <a id="hspaceLink">id='hspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object09.html b/dom/tests/mochitest/dom-level2-html/test_object09.html
new file mode 100644
index 0000000000..8f969113f5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object09.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Message to render while loading the object.
+The value of attribute standby of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673
+*/
+function object09() {
+ var success;
+ if(checkInitialization(builder, "object09") != null) return;
+ var nodeList;
+ var testNode;
+ var vstandby;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vstandby = testNode.standby;
+
+ assertEquals("standbyLink","Loading Image ...",vstandby);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object09</h2>
+<p>&lt;test name='object09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Message to render while loading the object.
+The value of attribute standby of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25039673</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vstandby' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;standby interface='HTMLObjectElement' obj='testNode' var='vstandby'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vstandby' expected='"Loading Image ..."' <a id="standbyLink">id='standbyLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object10.html b/dom/tests/mochitest/dom-level2-html/test_object10.html
new file mode 100644
index 0000000000..c22a7f6991
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object10.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Index that represents the element's position in the tabbing order.
+The value of attribute tabIndex of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787
+*/
+function object10() {
+ var success;
+ if(checkInitialization(builder, "object10") != null) return;
+ var nodeList;
+ var testNode;
+ var vtabindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtabindex = testNode.tabIndex;
+
+ assertEquals("tabIndexLink",0,vtabindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object10</h2>
+<p>&lt;test name='object10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Index that represents the element's position in the tabbing order.
+The value of attribute tabIndex of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27083787</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtabindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tabIndex interface='HTMLObjectElement' obj='testNode' var='vtabindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtabindex' expected='0' <a id="tabIndexLink">id='tabIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object11.html b/dom/tests/mochitest/dom-level2-html/test_object11.html
new file mode 100644
index 0000000000..a50bba9e59
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object11.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object11</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object11'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Content type for data downloaded via data attribute.
+The value of attribute type of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621
+*/
+function object11() {
+ var success;
+ if(checkInitialization(builder, "object11") != null) return;
+ var nodeList;
+ var testNode;
+ var vtype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vtype = testNode.type;
+
+ assertEquals("typeLink","image/gif",vtype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object11</h2>
+<p>&lt;test name='object11' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object11&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Content type for data downloaded via data attribute.
+The value of attribute type of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-91665621</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vtype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;type interface='HTMLObjectElement' obj='testNode' var='vtype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vtype' expected='"image/gif"' <a id="typeLink">id='typeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object12.html b/dom/tests/mochitest/dom-level2-html/test_object12.html
new file mode 100644
index 0000000000..9617273351
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object12.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute usemap of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772
+*/
+function object12() {
+ var success;
+ if(checkInitialization(builder, "object12") != null) return;
+ var nodeList;
+ var testNode;
+ var vusemap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vusemap = testNode.useMap;
+
+ assertEquals("useMapLink","#DivLogo-map",vusemap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object12</h2>
+<p>&lt;test name='object12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute usemap of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-6649772</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vusemap' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;useMap interface='HTMLObjectElement' obj='testNode' var='vusemap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vusemap' expected='"#DivLogo-map"' <a id="useMapLink">id='useMapLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object13.html b/dom/tests/mochitest/dom-level2-html/test_object13.html
new file mode 100644
index 0000000000..93b5a79372
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object13.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object13</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object13'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical space above and below this image, applet, or object.
+The value of attribute vspace of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483
+*/
+function object13() {
+ var success;
+ if(checkInitialization(builder, "object13") != null) return;
+ var nodeList;
+ var testNode;
+ var vvspace;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vvspace = testNode.vspace;
+
+ assertEquals("vspaceLink",0,vvspace);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object13</h2>
+<p>&lt;test name='object13' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-2 dom2.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object13&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical space above and below this image, applet, or object.
+The value of attribute vspace of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483">http://www.w3.org/TR/DOM-Level-2-HTML/html#ID-8682483</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvspace' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vspace interface='HTMLObjectElement' obj='testNode' var='vvspace'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvspace' expected='0' <a id="vspaceLink">id='vspaceLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object14.html b/dom/tests/mochitest/dom-level2-html/test_object14.html
new file mode 100644
index 0000000000..888a48e123
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object14.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object14</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object14'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute width of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620
+*/
+function object14() {
+ var success;
+ if(checkInitialization(builder, "object14") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","550",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object14</h2>
+<p>&lt;test name='object14' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object14&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute width of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-38538620</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLObjectElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"550"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_object15.html b/dom/tests/mochitest/dom-level2-html/test_object15.html
new file mode 100644
index 0000000000..0e3bb673e4
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_object15.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/object15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['object15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "object");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Content type for data downloaded via classid attribute.
+The value of attribute codetype of the object element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008
+*/
+function object15() {
+ var success;
+ if(checkInitialization(builder, "object15") != null) return;
+ var nodeList;
+ var testNode;
+ var vcodetype;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "object");
+ nodeList = doc.getElementsByTagName("object");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vcodetype = testNode.codeType;
+
+ assertEquals("codeTypeLink","image/gif",vcodetype);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/object15</h2>
+<p>&lt;test name='object15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;object15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Content type for data downloaded via classid attribute.
+The value of attribute codetype of the object element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-19945008</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcodetype' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='object' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"object"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;codeType interface='HTMLObjectElement' obj='testNode' var='vcodetype'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcodetype' expected='"image/gif"' <a id="codeTypeLink">id='codeTypeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/object.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table01.html b/dom/tests/mochitest/dom-level2-html/test_table01.html
new file mode 100644
index 0000000000..bbc83b2d81
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table01.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table01</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table1");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Returns the table's CAPTION, or void if none exists.
+The value of attribute caption of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
+*/
+function table01() {
+ var success;
+ if(checkInitialization(builder, "table01") != null) return;
+ var nodeList;
+ var testNode;
+ var vcaption;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table1");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vcaption = testNode.caption;
+
+ assertNull("captionLink",vcaption);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table01</h2>
+<p>&lt;test name='table01' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table01&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Returns the table's CAPTION, or void if none exists.
+The value of attribute caption of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcaption' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table1' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vcaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertNull actual='vcaption' <a id="captionLink">id='captionLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table1.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table02.html b/dom/tests/mochitest/dom-level2-html/test_table02.html
new file mode 100644
index 0000000000..a9e34590c0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table02.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table02</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Caption alignment with respect to the table.
+The value of attribute align of the tablecaption element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520
+*/
+function table02() {
+ var success;
+ if(checkInitialization(builder, "table02") != null) return;
+ var nodeList;
+ var testNode;
+ var vcaption;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vcaption = testNode.caption;
+
+ valign = vcaption.align;
+
+ assertEquals("alignLink","top",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table02</h2>
+<p>&lt;test name='table02' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table02&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Caption alignment with respect to the table.
+The value of attribute align of the tablecaption element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-14594520</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcaption' type='HTMLTableCaptionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;caption interface='HTMLTableElement' obj='testNode' var='vcaption'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCaptionElement' obj='vcaption' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"top"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table03.html b/dom/tests/mochitest/dom-level2-html/test_table03.html
new file mode 100644
index 0000000000..f7ad75f43d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table03.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table03</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table03'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Alignment character for cells in a column.
+The value of attribute ch of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
+*/
+function table03() {
+ var success;
+ if(checkInitialization(builder, "table03") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ vch = vsection.ch;
+
+ assertEquals("chLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table03</h2>
+<p>&lt;test name='table03' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table03&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Alignment character for cells in a column.
+The value of attribute ch of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableSectionElement' obj='vsection' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table04.html b/dom/tests/mochitest/dom-level2-html/test_table04.html
new file mode 100644
index 0000000000..464b901b23
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table04.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table04</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table04'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal alignment of data in cells.
+The value of attribute align of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
+*/
+function table04() {
+ var success;
+ if(checkInitialization(builder, "table04") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table04</h2>
+<p>&lt;test name='table04' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table04&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal alignment of data in cells.
+The value of attribute align of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table06.html b/dom/tests/mochitest/dom-level2-html/test_table06.html
new file mode 100644
index 0000000000..d0d9bff3ae
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table06.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table06</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table06'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical alignment of data in cells.
+The value of attribute valign of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table06() {
+ var success;
+ if(checkInitialization(builder, "table06") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vvAlign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ vvAlign = vsection.vAlign;
+
+ assertEquals("vAlignLink","middle",vvAlign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table06</h2>
+<p>&lt;test name='table06' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table06&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical alignment of data in cells.
+The value of attribute valign of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvAlign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableSectionElement' obj='vsection' var='vvAlign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvAlign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table07.html b/dom/tests/mochitest/dom-level2-html/test_table07.html
new file mode 100644
index 0000000000..e81ac9e402
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table07.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table07</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table07'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The collection of rows in this table section.
+The value of attribute rows of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table07() {
+ var success;
+ if(checkInitialization(builder, "table07") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vcollection;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ vcollection = vsection.rows;
+
+ vrows = vcollection.length;
+
+ assertEquals("vrowsLink",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table07</h2>
+<p>&lt;test name='table07' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table07&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The collection of rows in this table section.
+The value of attribute rows of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcollection' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection' var='vcollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vcollection' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="vrowsLink">id='vrowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table08.html b/dom/tests/mochitest/dom-level2-html/test_table08.html
new file mode 100644
index 0000000000..9d13c84819
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table08.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table08</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table08'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal alignment of data in cells.
+The value of attribute align of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table08() {
+ var success;
+ if(checkInitialization(builder, "table08") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ valign = vsection.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table08</h2>
+<p>&lt;test name='table08' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table08&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal alignment of data in cells.
+The value of attribute align of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableSectionElement' obj='vsection' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table09.html b/dom/tests/mochitest/dom-level2-html/test_table09.html
new file mode 100644
index 0000000000..1812d575fb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table09.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table09</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table09'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical alignment of data in cells.
+The value of attribute valign of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944
+*/
+function table09() {
+ var success;
+ if(checkInitialization(builder, "table09") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ vvalign = vsection.vAlign;
+
+ assertEquals("alignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table09</h2>
+<p>&lt;test name='table09' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table09&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical alignment of data in cells.
+The value of attribute valign of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-9530944</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableSectionElement' obj='vsection' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table10.html b/dom/tests/mochitest/dom-level2-html/test_table10.html
new file mode 100644
index 0000000000..63981731dc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table10.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table10</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table10'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Alignment character for cells in a column.
+The value of attribute ch of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table10() {
+ var success;
+ if(checkInitialization(builder, "table10") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ vch = vsection.ch;
+
+ assertEquals("chLink","+",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table10</h2>
+<p>&lt;test name='table10' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table10&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Alignment character for cells in a column.
+The value of attribute ch of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableSectionElement' obj='vsection' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"+"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table12.html b/dom/tests/mochitest/dom-level2-html/test_table12.html
new file mode 100644
index 0000000000..862d52b080
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table12.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table12</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table12'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Offset of alignment character.
+The value of attribute choff of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table12() {
+ var success;
+ if(checkInitialization(builder, "table12") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ vchoff = vsection.chOff;
+
+ assertEquals("choffLink","1",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table12</h2>
+<p>&lt;test name='table12' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table12&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Offset of alignment character.
+The value of attribute choff of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableSectionElement' obj='vsection' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"1"' <a id="choffLink">id='choffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table15.html b/dom/tests/mochitest/dom-level2-html/test_table15.html
new file mode 100644
index 0000000000..ee40383e13
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table15.html
@@ -0,0 +1,139 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table15</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table15'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The collection of rows in this table section.
+The value of attribute rows of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table15() {
+ var success;
+ if(checkInitialization(builder, "table15") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vcollection;
+ var vrows;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tHead;
+
+ vcollection = vsection.rows;
+
+ vrows = vcollection.length;
+
+ assertEquals("vrowsLink",1,vrows);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table15</h2>
+<p>&lt;test name='table15' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table15&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The collection of rows in this table section.
+The value of attribute rows of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcollection' type='HTMLCollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrows' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tHead interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rows interface='HTMLTableSectionElement' obj='vsection' var='vcollection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;length interface='HTMLCollection' obj='vcollection' var='vrows'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrows' expected='1' <a id="vrowsLink">id='vrowsLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table17.html b/dom/tests/mochitest/dom-level2-html/test_table17.html
new file mode 100644
index 0000000000..0fb4d56159
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table17.html
@@ -0,0 +1,136 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table17</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table17'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablesection");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Offset of alignment character.
+The value of attribute chOff of the tablesection element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097
+*/
+function table17() {
+ var success;
+ if(checkInitialization(builder, "table17") != null) return;
+ var nodeList;
+ var testNode;
+ var vsection;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablesection");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",2,nodeList);
+testNode = nodeList.item(1);
+ vsection = testNode.tFoot;
+
+ vchoff = vsection.chOff;
+
+ assertEquals("choffLink","2",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table17</h2>
+<p>&lt;test name='table17' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table17&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Offset of alignment character.
+The value of attribute chOff of the tablesection element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64197097</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsection' type='HTMLTableSectionElement'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablesection' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='2' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tFoot interface='HTMLTableElement' obj='testNode' var='vsection'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableSectionElement' obj='vsection' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"2"' <a id="choffLink">id='choffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablesection.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table18.html b/dom/tests/mochitest/dom-level2-html/test_table18.html
new file mode 100644
index 0000000000..43d735d1d7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table18.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table18</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table18'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The index of this cell in the row.
+The value of attribute cellIndex of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363
+*/
+function table18() {
+ var success;
+ if(checkInitialization(builder, "table18") != null) return;
+ var nodeList;
+ var testNode;
+ var vcindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcindex = testNode.cellIndex;
+
+ assertEquals("cellIndexLink",1,vcindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table18</h2>
+<p>&lt;test name='table18' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table18&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The index of this cell in the row.
+The value of attribute cellIndex of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-80748363</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellIndex interface='HTMLTableCellElement' obj='testNode' var='vcindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcindex' expected='1' <a id="cellIndexLink">id='cellIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table19.html b/dom/tests/mochitest/dom-level2-html/test_table19.html
new file mode 100644
index 0000000000..70b1973baf
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table19.html
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table19</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table19'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Abbreviation for header cells.
+The index of this cell in the row.
+The value of attribute abbr of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037
+*/
+function table19() {
+ var success;
+ if(checkInitialization(builder, "table19") != null) return;
+ var nodeList;
+ var testNode;
+ var vabbr;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vabbr = testNode.abbr;
+
+ assertEquals("abbrLink","hd2",vabbr);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table19</h2>
+<p>&lt;test name='table19' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table19&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Abbreviation for header cells.
+The index of this cell in the row.
+The value of attribute abbr of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74444037</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vabbr' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;abbr interface='HTMLTableCellElement' obj='testNode' var='vabbr'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vabbr' expected='"hd2"' <a id="abbrLink">id='abbrLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table20.html b/dom/tests/mochitest/dom-level2-html/test_table20.html
new file mode 100644
index 0000000000..0ee499ec4d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table20.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table20</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table20'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Names group of related headers.
+The value of attribute axis of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418
+*/
+function table20() {
+ var success;
+ if(checkInitialization(builder, "table20") != null) return;
+ var nodeList;
+ var testNode;
+ var vaxis;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vaxis = testNode.axis;
+
+ assertEquals("axisLink","center",vaxis);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table20</h2>
+<p>&lt;test name='table20' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table20&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Names group of related headers.
+The value of attribute axis of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-76554418</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vaxis' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;axis interface='HTMLTableCellElement' obj='testNode' var='vaxis'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vaxis' expected='"center"' <a id="axisLink">id='axisLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table21.html b/dom/tests/mochitest/dom-level2-html/test_table21.html
new file mode 100644
index 0000000000..47bc008009
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table21.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table21</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table21'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal alignment of data in cell.
+The value of attribute align of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879
+*/
+function table21() {
+ var success;
+ if(checkInitialization(builder, "table21") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table21</h2>
+<p>&lt;test name='table21' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table21&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal alignment of data in cell.
+The value of attribute align of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-98433879</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableCellElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table22.html b/dom/tests/mochitest/dom-level2-html/test_table22.html
new file mode 100644
index 0000000000..8b7a7885d5
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table22.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table22</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table22'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Cell background color.
+The value of attribute bgColor of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431
+*/
+function table22() {
+ var success;
+ if(checkInitialization(builder, "table22") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgcolorLink","#FF0000".toLowerCase(),vbgcolor.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table22</h2>
+<p>&lt;test name='table22' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table22&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Cell background color.
+The value of attribute bgColor of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-88135431</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableCellElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#FF0000"' <a id="bgcolorLink">id='bgcolorLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table23.html b/dom/tests/mochitest/dom-level2-html/test_table23.html
new file mode 100644
index 0000000000..691659797f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table23.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table23</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table23'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Alignment character for cells in a column.
+The value of attribute char of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780
+*/
+function table23() {
+ var success;
+ if(checkInitialization(builder, "table23") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("chLink",":",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table23</h2>
+<p>&lt;test name='table23' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table23&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Alignment character for cells in a column.
+The value of attribute char of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-30914780</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableCellElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='":"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table24.html b/dom/tests/mochitest/dom-level2-html/test_table24.html
new file mode 100644
index 0000000000..6397a803ad
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table24.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table24</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table24'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+offset of alignment character.
+The value of attribute chOff of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310
+*/
+function table24() {
+ var success;
+ if(checkInitialization(builder, "table24") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vchoff = testNode.chOff;
+
+ assertEquals("chOffLink","1",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table24</h2>
+<p>&lt;test name='table24' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table24&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+offset of alignment character.
+The value of attribute chOff of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-20144310</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableCellElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"1"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table25.html b/dom/tests/mochitest/dom-level2-html/test_table25.html
new file mode 100644
index 0000000000..107f652213
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table25.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table25</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table25'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Number of columns spanned by cell.
+The value of attribute colspan of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244
+*/
+function table25() {
+ var success;
+ if(checkInitialization(builder, "table25") != null) return;
+ var nodeList;
+ var testNode;
+ var vcolspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vcolspan = testNode.colSpan;
+
+ assertEquals("colSpanLink",1,vcolspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table25</h2>
+<p>&lt;test name='table25' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table25&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Number of columns spanned by cell.
+The value of attribute colspan of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-84645244</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcolspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;colSpan interface='HTMLTableCellElement' obj='testNode' var='vcolspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcolspan' expected='1' <a id="colSpanLink">id='colSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table26.html b/dom/tests/mochitest/dom-level2-html/test_table26.html
new file mode 100644
index 0000000000..aa9b94df7f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table26.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table26</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table26'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The value of attribute height of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212
+*/
+function table26() {
+ var success;
+ if(checkInitialization(builder, "table26") != null) return;
+ var nodeList;
+ var testNode;
+ var vheight;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheight = testNode.height;
+
+ assertEquals("heightLink","50",vheight);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table26</h2>
+<p>&lt;test name='table26' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table26&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The value of attribute height of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83679212</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheight' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;height interface='HTMLTableCellElement' obj='testNode' var='vheight'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheight' expected='"50"' <a id="heightLink">id='heightLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table27.html b/dom/tests/mochitest/dom-level2-html/test_table27.html
new file mode 100644
index 0000000000..ccb05c251b
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table27.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table27</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table27'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Suppress word wrapping.
+The value of attribute nowrap of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045
+*/
+function table27() {
+ var success;
+ if(checkInitialization(builder, "table27") != null) return;
+ var nodeList;
+ var testNode;
+ var vnowrap;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vnowrap = testNode.noWrap;
+
+ assertTrue("nowrapLink",vnowrap);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table27</h2>
+<p>&lt;test name='table27' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table27&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Suppress word wrapping.
+The value of attribute nowrap of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-62922045</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vnowrap' type='boolean'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;noWrap interface='HTMLTableCellElement' obj='testNode' var='vnowrap'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertTrue actual='vnowrap' <a id="nowrapLink">id='nowrapLink'</a>/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table28.html b/dom/tests/mochitest/dom-level2-html/test_table28.html
new file mode 100644
index 0000000000..719ffa42cc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table28.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table28</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table28'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Number of rows spanned by cell.
+The value of attribute rowspan of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625
+*/
+function table28() {
+ var success;
+ if(checkInitialization(builder, "table28") != null) return;
+ var nodeList;
+ var testNode;
+ var vrowspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vrowspan = testNode.rowSpan;
+
+ assertEquals("rowSpanLink",1,vrowspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table28</h2>
+<p>&lt;test name='table28' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table28&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Number of rows spanned by cell.
+The value of attribute rowspan of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-48237625</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrowspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowSpan interface='HTMLTableCellElement' obj='testNode' var='vrowspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrowspan' expected='1' <a id="rowSpanLink">id='rowSpanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table29.html b/dom/tests/mochitest/dom-level2-html/test_table29.html
new file mode 100644
index 0000000000..b3ba2a4cde
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table29.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table29</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table29'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Scope covered by header cells.
+The value of attribute scope of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952
+*/
+function table29() {
+ var success;
+ if(checkInitialization(builder, "table29") != null) return;
+ var nodeList;
+ var testNode;
+ var vscope;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vscope = testNode.scope;
+
+ assertEquals("scopeLink","col",vscope);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table29</h2>
+<p>&lt;test name='table29' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table29&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Scope covered by header cells.
+The value of attribute scope of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-36139952</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vscope' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;scope interface='HTMLTableCellElement' obj='testNode' var='vscope'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vscope' expected='"col"' <a id="scopeLink">id='scopeLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table30.html b/dom/tests/mochitest/dom-level2-html/test_table30.html
new file mode 100644
index 0000000000..20dd16e84d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table30.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table30</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table30'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+List of id attribute values for header cells.
+The value of attribute headers of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817
+*/
+function table30() {
+ var success;
+ if(checkInitialization(builder, "table30") != null) return;
+ var nodeList;
+ var testNode;
+ var vheaders;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vheaders = testNode.headers;
+
+ assertEquals("headersLink","header-3",vheaders);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table30</h2>
+<p>&lt;test name='table30' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table30&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+List of id attribute values for header cells.
+The value of attribute headers of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-89104817</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vheaders' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;headers interface='HTMLTableCellElement' obj='testNode' var='vheaders'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vheaders' expected='"header-3"' <a id="headersLink">id='headersLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table31.html b/dom/tests/mochitest/dom-level2-html/test_table31.html
new file mode 100644
index 0000000000..4384ea0cfb
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table31.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table31</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table31'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical alignment of data in cell.
+The value of attribute valign of the tablecell element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221
+*/
+function table31() {
+ var success;
+ if(checkInitialization(builder, "table31") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table31</h2>
+<p>&lt;test name='table31' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table31&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical alignment of data in cell.
+The value of attribute valign of the tablecell element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-58284221</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableCellElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table32.html b/dom/tests/mochitest/dom-level2-html/test_table32.html
new file mode 100644
index 0000000000..9c3f26440d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table32.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table32</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table32'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecell");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+cell width.
+The value of attribute width of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795
+*/
+function table32() {
+ var success;
+ if(checkInitialization(builder, "table32") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecell");
+ nodeList = doc.getElementsByTagName("td");
+ assertSize("Asize",4,nodeList);
+testNode = nodeList.item(1);
+ vwidth = testNode.width;
+
+ assertEquals("vwidthLink","175",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table32</h2>
+<p>&lt;test name='table32' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table32&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+cell width.
+The value of attribute width of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-27480795</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecell' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"td"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='4' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableCellElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"175"' <a id="vwidthLink">id='vwidthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecell.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table33.html b/dom/tests/mochitest/dom-level2-html/test_table33.html
new file mode 100644
index 0000000000..23ca0f415f
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table33.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table33</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table33'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies the table's position with respect to the rest of the document.
+The value of attribute align of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977
+*/
+function table33() {
+ var success;
+ if(checkInitialization(builder, "table33") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table33</h2>
+<p>&lt;test name='table33' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table33&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies the table's position with respect to the rest of the document.
+The value of attribute align of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-23180977</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table34.html b/dom/tests/mochitest/dom-level2-html/test_table34.html
new file mode 100644
index 0000000000..941683d8f6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table34.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table34</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table34'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The width of the border around the table.
+The value of attribute border of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400
+*/
+function table34() {
+ var success;
+ if(checkInitialization(builder, "table34") != null) return;
+ var nodeList;
+ var testNode;
+ var vborder;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vborder = testNode.border;
+
+ assertEquals("borderLink","4",vborder);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table34</h2>
+<p>&lt;test name='table34' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table34&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The width of the border around the table.
+The value of attribute border of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-50969400</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vborder' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;border interface='HTMLTableElement' obj='testNode' var='vborder'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vborder' expected='"4"' <a id="borderLink">id='borderLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table35.html b/dom/tests/mochitest/dom-level2-html/test_table35.html
new file mode 100644
index 0000000000..b62ed83751
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table35.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table35</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table35'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Cell background color.
+The value of attribute bgcolor of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985
+*/
+function table35() {
+ var success;
+ if(checkInitialization(builder, "table35") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgcolorLink","#ff0000",vbgcolor);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table35</h2>
+<p>&lt;test name='table35' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table35&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Cell background color.
+The value of attribute bgcolor of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83532985</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#ff0000"' <a id="bgcolorLink">id='bgcolorLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table36.html b/dom/tests/mochitest/dom-level2-html/test_table36.html
new file mode 100644
index 0000000000..fecd64ea7c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table36.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table36</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table36'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies which external table borders to render.
+The value of attribute frame of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476
+*/
+function table36() {
+ var success;
+ if(checkInitialization(builder, "table36") != null) return;
+ var nodeList;
+ var testNode;
+ var vframe;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vframe = testNode.frame;
+
+ assertEquals("frameLink","border",vframe);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table36</h2>
+<p>&lt;test name='table36' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table36&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies which external table borders to render.
+The value of attribute frame of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-64808476</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vframe' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;frame interface='HTMLTableElement' obj='testNode' var='vframe'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vframe' expected='"border"' <a id="frameLink">id='frameLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table37.html b/dom/tests/mochitest/dom-level2-html/test_table37.html
new file mode 100644
index 0000000000..ac1370db8d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table37.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table37</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table37'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies the horizontal and vertical space between cell content and cell borders. The value of attribute cellpadding of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158
+*/
+function table37() {
+ var success;
+ if(checkInitialization(builder, "table37") != null) return;
+ var nodeList;
+ var testNode;
+ var vcellpadding;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vcellpadding = testNode.cellPadding;
+
+ assertEquals("cellpaddingLink","2",vcellpadding);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table37</h2>
+<p>&lt;test name='table37' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table37&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies the horizontal and vertical space between cell content and cell borders. The value of attribute cellpadding of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-59162158</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcellpadding' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellPadding interface='HTMLTableElement' obj='testNode' var='vcellpadding'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcellpadding' expected='"2"' <a id="cellpaddingLink">id='cellpaddingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table38.html b/dom/tests/mochitest/dom-level2-html/test_table38.html
new file mode 100644
index 0000000000..2808b6ffac
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table38.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table38</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table38'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies the horizontal and vertical separation between cells.
+The value of attribute cellspacing of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883
+*/
+function table38() {
+ var success;
+ if(checkInitialization(builder, "table38") != null) return;
+ var nodeList;
+ var testNode;
+ var vcellspacing;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vcellspacing = testNode.cellSpacing;
+
+ assertEquals("cellspacingLink","2",vcellspacing);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table38</h2>
+<p>&lt;test name='table38' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table38&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies the horizontal and vertical separation between cells.
+The value of attribute cellspacing of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68907883</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vcellspacing' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;cellSpacing interface='HTMLTableElement' obj='testNode' var='vcellspacing'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vcellspacing' expected='"2"' <a id="cellspacingLink">id='cellspacingLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table39.html b/dom/tests/mochitest/dom-level2-html/test_table39.html
new file mode 100644
index 0000000000..0e44add03c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table39.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table39</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table39'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Supplementary description about the purpose or structure of a table.
+The value of attribute summary of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528
+*/
+function table39() {
+ var success;
+ if(checkInitialization(builder, "table39") != null) return;
+ var nodeList;
+ var testNode;
+ var vsummary;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vsummary = testNode.summary;
+
+ assertEquals("summaryLink","HTML Control Table",vsummary);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table39</h2>
+<p>&lt;test name='table39' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table39&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Supplementary description about the purpose or structure of a table.
+The value of attribute summary of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-44998528</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vsummary' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;summary interface='HTMLTableElement' obj='testNode' var='vsummary'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vsummary' expected='"HTML Control Table"' <a id="summaryLink">id='summaryLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table40.html b/dom/tests/mochitest/dom-level2-html/test_table40.html
new file mode 100644
index 0000000000..7bd7104fb8
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table40.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table40</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table40'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies which internal table borders to render.
+The value of attribute rules of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553
+*/
+function table40() {
+ var success;
+ if(checkInitialization(builder, "table40") != null) return;
+ var nodeList;
+ var testNode;
+ var vrules;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vrules = testNode.rules;
+
+ assertEquals("rulesLink","all",vrules);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table40</h2>
+<p>&lt;test name='table40' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table40&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies which internal table borders to render.
+The value of attribute rules of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-26347553</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrules' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rules interface='HTMLTableElement' obj='testNode' var='vrules'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrules' expected='"all"' <a id="rulesLink">id='rulesLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table41.html b/dom/tests/mochitest/dom-level2-html/test_table41.html
new file mode 100644
index 0000000000..4ef3a6cde6
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table41.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table41</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table41'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Specifies the desired table width.
+The value of attribute width of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361
+*/
+function table41() {
+ var success;
+ if(checkInitialization(builder, "table41") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("table");
+ assertSize("Asize",3,nodeList);
+testNode = nodeList.item(1);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","680",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table41</h2>
+<p>&lt;test name='table41' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table41&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Specifies the desired table width.
+The value of attribute width of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-77447361</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"table"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='3' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"680"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table42.html b/dom/tests/mochitest/dom-level2-html/test_table42.html
new file mode 100644
index 0000000000..c834b83b4c
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table42.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table42</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table42'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal alignment of data within cells of this row.
+The value of attribute align of the tablerow element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
+*/
+function table42() {
+ var success;
+ if(checkInitialization(builder, "table42") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",8,nodeList);
+testNode = nodeList.item(1);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table42</h2>
+<p>&lt;test name='table42' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table42&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal alignment of data within cells of this row.
+The value of attribute align of the tablerow element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='8' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableRowElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table43.html b/dom/tests/mochitest/dom-level2-html/test_table43.html
new file mode 100644
index 0000000000..4c41700ab9
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table43.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table43</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table43'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Background color for rows.
+The value of attribute bgcolor of the tablerow element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327
+*/
+function table43() {
+ var success;
+ if(checkInitialization(builder, "table43") != null) return;
+ var nodeList;
+ var testNode;
+ var vbgcolor;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",8,nodeList);
+testNode = nodeList.item(1);
+ vbgcolor = testNode.bgColor;
+
+ assertEquals("bgcolorLink","#00FFFF".toLowerCase(),vbgcolor.toLowerCase());
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table43</h2>
+<p>&lt;test name='table43' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table43&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Background color for rows.
+The value of attribute bgcolor of the tablerow element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-18161327</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vbgcolor' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='8' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;bgColor interface='HTMLTableRowElement' obj='testNode' var='vbgcolor'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vbgcolor' expected='"#00FFFF"' <a id="bgcolorLink">id='bgcolorLink'</a> ignoreCase='true'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table44.html b/dom/tests/mochitest/dom-level2-html/test_table44.html
new file mode 100644
index 0000000000..b4cc70d7ad
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table44.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table44</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table44'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "table");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical alignment of data within cells of this row.
+The value of attribute valign of the tablerow element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058
+*/
+function table44() {
+ var success;
+ if(checkInitialization(builder, "table44") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "table");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",8,nodeList);
+testNode = nodeList.item(1);
+ vvalign = testNode.vAlign;
+
+ assertEquals("valignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table44</h2>
+<p>&lt;test name='table44' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table44&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical alignment of data within cells of this row.
+The value of attribute valign of the tablerow element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-90000058</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='table' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='8' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableRowElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="valignLink">id='valignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/table.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table45.html b/dom/tests/mochitest/dom-level2-html/test_table45.html
new file mode 100644
index 0000000000..ef7b8352b3
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table45.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table45</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table45'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Alignment character for cells in a column.
+The value of attribute ch of the tablerow element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
+*/
+function table45() {
+ var success;
+ if(checkInitialization(builder, "table45") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vch = testNode.ch;
+
+ assertEquals("vchLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table45</h2>
+<p>&lt;test name='table45' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table45&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Alignment character for cells in a column.
+The value of attribute ch of the tablerow element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableRowElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="vchLink">id='vchLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table46.html b/dom/tests/mochitest/dom-level2-html/test_table46.html
new file mode 100644
index 0000000000..46b1f81d73
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table46.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table46</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table46'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Offset of alignment character.
+The value of attribute choff of the tablerow element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
+*/
+function table46() {
+ var success;
+ if(checkInitialization(builder, "table46") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(1);
+ vchoff = testNode.chOff;
+
+ assertEquals("choffLink","1",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table46</h2>
+<p>&lt;test name='table46' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table46&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Offset of alignment character.
+The value of attribute choff of the tablerow element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='1'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableRowElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"1"' <a id="choffLink">id='choffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table47.html b/dom/tests/mochitest/dom-level2-html/test_table47.html
new file mode 100644
index 0000000000..9c2ee518b7
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table47.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table47</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table47'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablerow");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+The index of this row, relative to the entire table.
+The value of attribute rowIndex of the table element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567
+*/
+function table47() {
+ var success;
+ if(checkInitialization(builder, "table47") != null) return;
+ var nodeList;
+ var testNode;
+ var vrindex;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablerow");
+ nodeList = doc.getElementsByTagName("tr");
+ assertSize("Asize",5,nodeList);
+testNode = nodeList.item(4);
+ vrindex = testNode.rowIndex;
+
+ assertEquals("rowIndexLink",2,vrindex);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table47</h2>
+<p>&lt;test name='table47' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table47&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+The index of this row, relative to the entire table.
+The value of attribute rowIndex of the table element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-67347567</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vrindex' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablerow' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"tr"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='5' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='4'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;rowIndex interface='HTMLTableRowElement' obj='testNode' var='vrindex'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vrindex' expected='2' <a id="rowIndexLink">id='rowIndexLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablerow.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table48.html b/dom/tests/mochitest/dom-level2-html/test_table48.html
new file mode 100644
index 0000000000..1fadc4b913
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table48.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table48</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table48'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Horizontal alignment of cell data in column.
+The value of attribute align of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257
+*/
+function table48() {
+ var success;
+ if(checkInitialization(builder, "table48") != null) return;
+ var nodeList;
+ var testNode;
+ var valign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ valign = testNode.align;
+
+ assertEquals("alignLink","center",valign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table48</h2>
+<p>&lt;test name='table48' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;HTMLTableColElement align&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Horizontal alignment of cell data in column.
+The value of attribute align of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-74098257</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='valign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;align interface='HTMLTableColElement' obj='testNode' var='valign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='valign' expected='"center"' <a id="alignLink">id='alignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table49.html b/dom/tests/mochitest/dom-level2-html/test_table49.html
new file mode 100644
index 0000000000..3d0e51e1d0
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table49.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table49</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table49'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Alignment character for cells in a column.
+The value of attribute ch of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502
+*/
+function table49() {
+ var success;
+ if(checkInitialization(builder, "table49") != null) return;
+ var nodeList;
+ var testNode;
+ var vch;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vch = testNode.ch;
+
+ assertEquals("chLink","*",vch);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table49</h2>
+<p>&lt;test name='table49' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table49&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Alignment character for cells in a column.
+The value of attribute ch of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-16230502</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vch' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ch interface='HTMLTableColElement' obj='testNode' var='vch'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vch' expected='"*"' <a id="chLink">id='chLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table50.html b/dom/tests/mochitest/dom-level2-html/test_table50.html
new file mode 100644
index 0000000000..42a24f385d
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table50.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table50</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table50'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Offset of alignment character.
+The value of attribute choff of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461
+*/
+function table50() {
+ var success;
+ if(checkInitialization(builder, "table50") != null) return;
+ var nodeList;
+ var testNode;
+ var vchoff;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vchoff = testNode.chOff;
+
+ assertEquals("chOffLink","20",vchoff);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table50</h2>
+<p>&lt;test name='table50' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table50&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Offset of alignment character.
+The value of attribute choff of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-68207461</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vchoff' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;chOff interface='HTMLTableColElement' obj='testNode' var='vchoff'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vchoff' expected='"20"' <a id="chOffLink">id='chOffLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table51.html b/dom/tests/mochitest/dom-level2-html/test_table51.html
new file mode 100644
index 0000000000..095ff6f191
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table51.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table51</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table51'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Indicates the number of columns in a group or affected by a grouping.
+The value of attribute span of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335
+*/
+function table51() {
+ var success;
+ if(checkInitialization(builder, "table51") != null) return;
+ var nodeList;
+ var testNode;
+ var vspan;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vspan = testNode.span;
+
+ assertEquals("spanLink",1,vspan);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table51</h2>
+<p>&lt;test name='table51' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table51&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Indicates the number of columns in a group or affected by a grouping.
+The value of attribute span of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-96511335</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vspan' type='int'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span interface='HTMLTableColElement' obj='testNode' var='vspan'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vspan' expected='1' <a id="spanLink">id='spanLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table52.html b/dom/tests/mochitest/dom-level2-html/test_table52.html
new file mode 100644
index 0000000000..f8724c73bc
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table52.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table52</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table52'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Vertical alignment of cell data in column.
+The value of attribute valign of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710
+*/
+function table52() {
+ var success;
+ if(checkInitialization(builder, "table52") != null) return;
+ var nodeList;
+ var testNode;
+ var vvalign;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vvalign = testNode.vAlign;
+
+ assertEquals("vAlignLink","middle",vvalign);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table52</h2>
+<p>&lt;test name='table52' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table52&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Vertical alignment of cell data in column.
+The value of attribute valign of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-83291710</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vvalign' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;vAlign interface='HTMLTableColElement' obj='testNode' var='vvalign'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vvalign' expected='"middle"' <a id="vAlignLink">id='vAlignLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>
diff --git a/dom/tests/mochitest/dom-level2-html/test_table53.html b/dom/tests/mochitest/dom-level2-html/test_table53.html
new file mode 100644
index 0000000000..5442287b17
--- /dev/null
+++ b/dom/tests/mochitest/dom-level2-html/test_table53.html
@@ -0,0 +1,133 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+<title>http://www.w3.org/2001/DOM-Test-Suite/level2/html/table53</title>
+<link type="text/css" rel="stylesheet" href="/tests/SimpleTest/test.css">
+<script src="/tests/SimpleTest/SimpleTest.js" type="text/javascript"></script>
+<script src="DOMTestCase.js" type="text/javascript"></script>
+<script type="text/javascript">
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['table53'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+// This function is called by the testing framework before
+// running the test suite.
+//
+// If there are no configuration exceptions, asynchronous
+// document loading is started. Otherwise, the status
+// is set to complete and the exception is immediately
+// raised when entering the body of the test.
+//
+function setUpPage() {
+ setUpPageStatus = 'running';
+ try {
+ //
+ // creates test document builder, may throw exception
+ //
+ builder = createConfiguredBuilder();
+
+ docsLoaded = 0;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ docsLoaded += preload(docRef, "doc", "tablecol");
+
+ if (docsLoaded == 1) {
+ setUpPage = 'complete';
+ }
+ } catch(ex) {
+ catchInitializationError(builder, ex);
+ setUpPage = 'complete';
+ }
+}
+
+
+
+//
+// This method is called on the completion of
+// each asychronous load started in setUpTests.
+//
+// When every synchronous loaded document has completed,
+// the page status is changed which allows the
+// body of the test to be executed.
+function loadComplete() {
+ if (++docsLoaded == 1) {
+ setUpPageStatus = 'complete';
+ runJSUnitTests();
+ SimpleTest.finish();
+ }
+}
+
+
+/**
+*
+Default column width.
+The value of attribute width of the tablecol element is read and checked against the expected value.
+
+* @author Netscape
+* @author Sivakiran Tummala
+* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799
+*/
+function table53() {
+ var success;
+ if(checkInitialization(builder, "table53") != null) return;
+ var nodeList;
+ var testNode;
+ var vwidth;
+ var doc;
+
+ var docRef = null;
+ if (typeof(this.doc) != 'undefined') {
+ docRef = this.doc;
+ }
+ doc = load(docRef, "doc", "tablecol");
+ nodeList = doc.getElementsByTagName("col");
+ assertSize("Asize",1,nodeList);
+testNode = nodeList.item(0);
+ vwidth = testNode.width;
+
+ assertEquals("widthLink","20",vwidth);
+
+}
+
+</script>
+</head>
+<body>
+<h2>Test http://www.w3.org/2001/DOM-Test-Suite/level2/html/table53</h2>
+<p>&lt;test name='table53' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-1 dom1.xsd'&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;table53&lt;/title&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;creator&gt;Netscape&lt;/creator&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;description&gt;
+Default column width.
+The value of attribute width of the tablecol element is read and checked against the expected value.
+&lt;/description&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;contributor&gt;Sivakiran Tummala&lt;/contributor&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;date qualifier='created'&gt;2002-02-15&lt;/date&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;subject resource='<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-25196799</a>'/&gt;
+<br>&lt;/metadata&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='nodeList' type='NodeList'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='testNode' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='vwidth' type='DOMString'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var name='doc' type='Node'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;load var='doc' href='tablecol' willBeModified='false'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;getElementsByTagName interface='Document' obj='doc' var='nodeList' tagname='"col"'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertSize collection='nodeList' size='1' <a id="Asize">id='Asize'</a>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;item interface='NodeList' obj='nodeList' var='testNode' index='0'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;width interface='HTMLTableColElement' obj='testNode' var='vwidth'/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;assertEquals actual='vwidth' expected='"20"' <a id="widthLink">id='widthLink'</a> ignoreCase='false'/&gt;<br>&lt;/test&gt;<br>
+</p>
+<p>
+ Copyright (c) 2001-2004 World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. This program is distributed under the W3C's Software
+ Intellectual Property License. This program is distributed in the
+ hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.
+ </p>
+<p>See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
+ for more details.</p>
+<iframe name="doc" src="files/tablecol.html"></iframe>
+<br>
+</body>
+</html>